Commit 405d922b authored by Nan Jiang's avatar Nan Jiang
Browse files

Bug 1822327 - Add hostname for SPOC topsites r=thecount

parent e667259f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
        }
+1 −0
Original line number Diff line number Diff line
@@ -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");
        }
      });