Bug 1167243 - Intermittent browser_newtab_enhanced.js | Suggested for {'Web Education'|'Technology'} enthusiasts [r=adw, a=lizzard]
authorMarina Samuel <msamuel@mozilla.com>
Fri, 22 May 2015 16:37:30 -0700
changeset 262345 e5bb6c8253ed3177c8c3307fe8cfb88316363e07
parent 262344 06ba020c6f0f7d654c1f3378596525f73415f8ca
child 262346 9f4d4ce255a1561c90097078abf63bff01167855
push id8053
push useredilee@gmail.com
push dateWed, 27 May 2015 20:40:43 +0000
treeherdermozilla-aurora@e5bb6c8253ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw, lizzard
bugs1167243
milestone40.0a2
Bug 1167243 - Intermittent browser_newtab_enhanced.js | Suggested for {'Web Education'|'Technology'} enthusiasts [r=adw, a=lizzard]
browser/base/content/test/newtab/browser_newtab_enhanced.js
--- a/browser/base/content/test/newtab/browser_newtab_enhanced.js
+++ b/browser/base/content/test/newtab/browser_newtab_enhanced.js
@@ -154,36 +154,39 @@ function runTests() {
   is(getData(9), null, "there is a suggested link followed by an enhanced history link and the remaining history links");
 
 
 
   // Test override category/adgroup name.
   suggestedLink.adgroup_name = "Technology";
   Services.prefs.setCharPref(PREF_NEWTAB_DIRECTORYSOURCE,
     "data:application/json," + JSON.stringify({"suggested": [suggestedLink]}));
+  yield watchLinksChangeOnce().then(TestRunner.next);
 
   yield addNewTabPageTab();
   ({type, enhanced, title, suggested} = getData(0));
   Cu.reportError("SUGGEST " + suggested);
   ok(suggested.indexOf("Suggested for <strong> Technology </strong> visitors") > -1, "Suggested for 'Technology'");
 
 
   // Test server provided explanation string.
   suggestedLink.explanation = "Suggested for %1$S enthusiasts who visit sites like %2$S";
   Services.prefs.setCharPref(PREF_NEWTAB_DIRECTORYSOURCE,
     "data:application/json," + encodeURIComponent(JSON.stringify({"suggested": [suggestedLink]})));
+  yield watchLinksChangeOnce().then(TestRunner.next);
 
   yield addNewTabPageTab();
   ({type, enhanced, title, suggested} = getData(0));
   Cu.reportError("SUGGEST " + suggested);
   ok(suggested.indexOf("Suggested for <strong> Technology </strong> enthusiasts who visit sites like <strong> classroom.google.com </strong>") > -1, "Suggested for 'Technology' enthusiasts");
 
 
     // Test server provided explanation string without category override.
   delete suggestedLink.adgroup_name;
   Services.prefs.setCharPref(PREF_NEWTAB_DIRECTORYSOURCE,
     "data:application/json," + encodeURIComponent(JSON.stringify({"suggested": [suggestedLink]})));
+  yield watchLinksChangeOnce().then(TestRunner.next);
 
   yield addNewTabPageTab();
   ({type, enhanced, title, suggested} = getData(0));
   Cu.reportError("SUGGEST " + suggested);
   ok(suggested.indexOf("Suggested for <strong> Web Education </strong> enthusiasts who visit sites like <strong> classroom.google.com </strong>") > -1, "Suggested for 'Web Education' enthusiasts");
 }