Bug 1240014, enable test browser_newtab_bug723102 in e10s, r=adw
authorNeil Deakin <neil@mozilla.com>
Tue, 26 Jan 2016 08:16:10 -0500
changeset 304684 4a2d71ad9d983adb9a3a9733d795095c51c44473
parent 304683 a8e24f63006964539cd2589d4bb070dfead5ed63
child 304685 80879e1c8b7f5ccef173ddd132b99ef587820ea0
push id9214
push userraliiev@mozilla.com
push dateMon, 07 Mar 2016 14:25:21 +0000
treeherdermozilla-aurora@8849dd1a4a79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1240014, 723102
milestone47.0a1
Bug 1240014, enable test browser_newtab_bug723102 in e10s, r=adw
browser/base/content/test/newtab/browser_newtab_bug723102.js
--- a/browser/base/content/test/newtab/browser_newtab_bug723102.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug723102.js
@@ -1,19 +1,25 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function runTests() {
+add_task(function* () {
   // create a new tab page and hide it.
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("");
 
-  yield addNewTabPageTab();
+  yield* addNewTabPageTab();
   let firstTab = gBrowser.selectedTab;
 
-  yield addNewTabPageTab();
-  gBrowser.removeTab(firstTab);
+  yield* addNewTabPageTab();
+  yield BrowserTestUtils.removeTab(firstTab);
 
   ok(NewTabUtils.allPages.enabled, "page is enabled");
   NewTabUtils.allPages.enabled = false;
-  ok(getGrid().node.hasAttribute("page-disabled"), "page is disabled");
+
+  let disabled = yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
+    return content.gGrid.node.hasAttribute("page-disabled");
+  });
+  ok(disabled, "page is disabled");
+
   NewTabUtils.allPages.enabled = true;
-}
+});
+