Bug 1062683 - Remove urls from new tab pings [r=adw a=lmandel]
authorEd Lee <edilee@mozilla.com>
Thu, 04 Sep 2014 11:54:00 -0400
changeset 216664 c81810e5f3a5
parent 216663 32560f800b2e
child 216665 872fe12f9214
push id3867
push useredilee@gmail.com
push date2014-09-06 18:11 +0000
treeherdermozilla-beta@c81810e5f3a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw, lmandel
bugs1062683
milestone33.0
Bug 1062683 - Remove urls from new tab pings [r=adw a=lmandel]
toolkit/modules/DirectoryLinksProvider.jsm
toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js
--- a/toolkit/modules/DirectoryLinksProvider.jsm
+++ b/toolkit/modules/DirectoryLinksProvider.jsm
@@ -336,17 +336,17 @@ let DirectoryLinksProvider = {
 
           // Make the payload in a way so keys can be excluded when stringified
           let id = link.directoryId;
           tiles.push({
             id: id || site.enhancedId,
             pin: site.isPinned() ? 1 : undefined,
             pos: pos != tilesIndex ? pos : undefined,
             score: Math.round(link.frecency / PING_SCORE_DIVISOR) || undefined,
-            url: site.enhancedId && link.url,
+            url: site.enhancedId && "",
           });
         }
         return tiles;
       }, []),
     };
 
     // Provide a direct index to the tile triggering the action
     if (actionIndex !== undefined) {
--- a/toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js
+++ b/toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js
@@ -263,17 +263,17 @@ add_task(function test_reportSitesAction
     url: undefined,
   })));
   expectedPost.view = 1;
   yield sendPingAndTest("view", "view", 2);
 
   // Make the history tile enhanced so it reports both id and url
   sites[2].enhancedId = "id from enhanced";
   expectedPost.tiles[1].id = "id from enhanced";
-  expectedPost.tiles[1].url = sites[2].link.url;
+  expectedPost.tiles[1].url = "";
   yield sendPingAndTest("view", "view", 2);
 
   // Click the 0th site / 0th tile
   delete expectedPost.view;
   expectedPost.click = 0;
   yield sendPingAndTest("click", "click", 0);
 
   // Click the 2th site / 1th tile