Bug 1102018 - Fix and enable browser_bug481560.js for e10s. r=gijs
authorDão Gottwald <dao@mozilla.com>
Thu, 20 Nov 2014 14:36:04 +0100
changeset 241066 04fdc77c9d7c
parent 241065 2df1080da369
child 241067 20d336286e35
push id4311
push userraliiev@mozilla.com
push date2015-01-12 19:37 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1102018, 481560
milestone36.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 1102018 - Fix and enable browser_bug481560.js for e10s. r=gijs
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_bug481560.js
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -174,17 +174,16 @@ skip-if = e10s # Bug 866413 - PageInfo d
 skip-if = toolkit == "cocoa" || e10s # Bug 1102017 - middle-button mousedown on selected tab2 does not activate tab - Didn't expect [object XULElement], but got it
 [browser_bug462673.js]
 skip-if = e10s # Bug 1093404 - test expects sync window opening from content and is disappointed in that expectation
 [browser_bug477014.js]
 skip-if = e10s # Bug 1093206 - need to re-enable tests relying on swapFrameLoaders et al for e10s
 [browser_bug479408.js]
 skip-if = buildapp == 'mulet'
 [browser_bug481560.js]
-skip-if = e10s # Bug 1102018 - This bug attaches an event listener directly to the content, which then never gets called.
 [browser_bug484315.js]
 skip-if = e10s
 [browser_bug491431.js]
 skip-if = buildapp == 'mulet'
 [browser_bug495058.js]
 skip-if = e10s # Bug 1093206 - need to re-enable tests relying on swapFrameLoaders et al (and thus replaceTabWithWindow) for e10s
 [browser_bug517902.js]
 skip-if = e10s # Bug 866413 - PageInfo doesn't work in e10s
--- a/browser/base/content/test/general/browser_bug481560.js
+++ b/browser/base/content/test/general/browser_bug481560.js
@@ -1,27 +1,21 @@
 function test() {
   waitForExplicitFinish();
 
-  var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
-
-  win.addEventListener("load", function () {
-    win.removeEventListener("load", arguments.callee, false);
-
-    win.content.addEventListener("focus", function () {
-      win.content.removeEventListener("focus", arguments.callee, false);
-
+  whenNewWindowLoaded(null, function (win) {
+    waitForFocus(function () {
       function onTabClose() {
         ok(false, "shouldn't have gotten the TabClose event for the last tab");
       }
       var tab = win.gBrowser.selectedTab;
       tab.addEventListener("TabClose", onTabClose, false);
 
       EventUtils.synthesizeKey("w", { accelKey: true }, win);
 
       ok(win.closed, "accel+w closed the window immediately");
 
       tab.removeEventListener("TabClose", onTabClose, false);
 
       finish();
-    }, false);
-  }, false);
+    }, win);
+  });
 }