author | Mike Conley <mconley@mozilla.com> |
Mon, 26 Jan 2015 15:21:34 -0500 | |
changeset 228525 | be43b4de674dac19ea48a5ed23d7bb64fca734fd |
parent 228524 | 573126edf2c8e851dc44bc2348af056994537f43 |
child 228526 | 179ab8bb80aeb209b9c7ce2565defa1395ed9e02 |
push id | 28264 |
push user | cbook@mozilla.com |
push date | Wed, 11 Feb 2015 13:58:35 +0000 |
treeherder | mozilla-central@38058cb42a0e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ttaubert |
bugs | 1047603 |
milestone | 38.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
|
browser/components/sessionstore/test/browser_394759_behavior.js | file | annotate | diff | comparison | revisions |
--- a/browser/components/sessionstore/test/browser_394759_behavior.js +++ b/browser/components/sessionstore/test/browser_394759_behavior.js @@ -34,21 +34,33 @@ function test() { // hack to force window to be considered a popup (toolbar=no didn't work) let winData = windowsToOpen.shift(); let settings = "chrome,dialog=no," + (winData.isPopup ? "all=no" : "all"); let url = "http://example.com/?window=" + windowsToOpen.length; provideWindow(function onTestURLLoaded(win) { - win.close(); - // Give it time to close - executeSoon(function() { - openWindowRec(windowsToOpen, expectedResults, recCallback); - }); + let tabReady = () => { + win.close(); + // Give it time to close + executeSoon(function() { + openWindowRec(windowsToOpen, expectedResults, recCallback); + }); + }; + + if (win.gMultiProcessBrowser) { + let tab = win.gBrowser.selectedTab; + tab.addEventListener("SSTabRestored", function onTabRestored() { + tab.removeEventListener("SSTabRestored", onTabRestored); + tabReady(); + }); + } else { + tabReady(); + } }, url, settings); } let windowsToOpen = [{isPopup: false}, {isPopup: false}, {isPopup: true}, {isPopup: true}, {isPopup: true}];