Loading browser/components/newtab/lib/TopSitesFeed.jsm +2 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,8 @@ class TopSitesFeed { // Set this so that SPOC topsites won't be shown in the URL bar. // See Bug 1822027. Note that `sponsored_position` is 1-based. sponsored_position: positionIndex + 1, // This is used for topsites deduping. hostname: shortURL({ url: spoc.url }), }; sponsored.push(link); } Loading browser/components/newtab/test/unit/lib/TopSitesFeed.test.js +1 −0 Original line number Diff line number Diff line Loading @@ -648,6 +648,7 @@ describe("Top Sites Feed", () => { assert.equal(link.type, "SPOC"); assert.equal(link.title, "test spoc"); assert.equal(link.sponsored_position, i + 1); assert.equal(link.hostname, "test-spoc"); assert.equal(link.url, "https://test-spoc.com"); } }); Loading Loading
browser/components/newtab/lib/TopSitesFeed.jsm +2 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,8 @@ class TopSitesFeed { // Set this so that SPOC topsites won't be shown in the URL bar. // See Bug 1822027. Note that `sponsored_position` is 1-based. sponsored_position: positionIndex + 1, // This is used for topsites deduping. hostname: shortURL({ url: spoc.url }), }; sponsored.push(link); } Loading
browser/components/newtab/test/unit/lib/TopSitesFeed.test.js +1 −0 Original line number Diff line number Diff line Loading @@ -648,6 +648,7 @@ describe("Top Sites Feed", () => { assert.equal(link.type, "SPOC"); assert.equal(link.title, "test spoc"); assert.equal(link.sponsored_position, i + 1); assert.equal(link.hostname, "test-spoc"); assert.equal(link.url, "https://test-spoc.com"); } }); Loading