Bug 1093373 , e10s, fix and re-enable browser_bug647886 .js, r=gijs
authorNeil Deakin <neil@mozilla.com>
Wed, 06 May 2015 13:17:45 -0400
changeset 242572 ba0460bfab056ae4743f7b3238a79458d6e119c5
parent 242571 a0c4366798b429b1bd2c17c7130031ec2bea7150
child 242573 020d3722b3ff27156c6480c44179b7084325136a
push id59447
push userneil@mozilla.com
push dateWed, 06 May 2015 17:18:09 +0000
treeherdermozilla-inbound@ba0460bfab05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1093373, 647886
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1093373 , e10s, fix and re-enable browser_bug647886 .js, r=gijs
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_bug647886.js
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -233,17 +233,17 @@ skip-if = e10s # Bug 653065 - Make the l
 [browser_bug597218.js]
 [browser_bug609700.js]
 [browser_bug623155.js]
 skip-if = e10s && debug
 [browser_bug623893.js]
 [browser_bug624734.js]
 [browser_bug633691.js]
 [browser_bug647886.js]
-skip-if = buildapp == 'mulet' || e10s # Bug 1093373 - Relies on browser.sessionHistory
+skip-if = buildapp == 'mulet'
 [browser_bug655584.js]
 [browser_bug664672.js]
 [browser_bug676619.js]
 skip-if = buildapp == 'mulet' || os == "mac" # mac: Intermittent failures, bug 925225
 [browser_bug678392.js]
 skip-if = e10s # bug 1102331 - does focus things on the content window which break in e10s mode
 [browser_bug710878.js]
 [browser_bug719271.js]
--- a/browser/base/content/test/general/browser_bug647886.js
+++ b/browser/base/content/test/general/browser_bug647886.js
@@ -1,36 +1,25 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-function test() {
-  waitForExplicitFinish();
+add_task(function* () {
+  yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com");
 
-  gBrowser.selectedTab = gBrowser.addTab();
-  gBrowser.selectedBrowser.addEventListener("load", function () {
-    gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
-
+  yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
     content.history.pushState({}, "2", "2.html");
-
-    testBackButton();
-  }, true);
+  });
 
-  loadURI("http://example.com");
-}
-
-function testBackButton() {
   var backButton = document.getElementById("back-button");
   var rect = backButton.getBoundingClientRect();
 
   info("waiting for the history menu to open");
 
-  backButton.addEventListener("popupshown", function (event) {
-    backButton.removeEventListener("popupshown", arguments.callee, false);
-
-    ok(true, "history menu opened");
-    event.target.hidePopup();
-    gBrowser.removeTab(gBrowser.selectedTab);
-    finish();
-  }, false);
-
+  let popupShownPromise = BrowserTestUtils.waitForEvent(backButton, "popupshown");
   EventUtils.synthesizeMouseAtCenter(backButton, {type: "mousedown"});
   EventUtils.synthesizeMouse(backButton, rect.width / 2, rect.height, {type: "mouseup"});
-}
+  let event = yield popupShownPromise;
+
+  ok(true, "history menu opened");
+
+  event.target.hidePopup();
+  gBrowser.removeTab(gBrowser.selectedTab);
+});