mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1047603 - Fix browser_394759_behaviour.js test. r=ttaubert.
Turns out this test wasn't accustomed to newly created windows having initially non-remote browsers, and that we need to wait for them to redirect and restore in the content process before we can properly serialize the window. --HG-- extra : rebase_source : 109fe1312a3014ef2036e4ed9cfb4d08b6c4f45e
This commit is contained in:
parent
3b4d33acec
commit
955064491e
@ -39,11 +39,24 @@ function test() {
|
||||
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 = () => {
|
||||
promiseWindowClosed(win).then(() => {
|
||||
openWindowRec(windowsToOpen, expectedResults, recCallback);
|
||||
});
|
||||
};
|
||||
|
||||
if (win.gMultiProcessBrowser) {
|
||||
// For e10s windows, the initial browser starts out non-remote and then
|
||||
// gets transitioned to remote once a document is requested. The
|
||||
// history of a browser when transitioned from one remote state to
|
||||
// another gets restored to the new browser. We need to wait for this
|
||||
// restoration to occur when we load our test URL, otherwise closed
|
||||
// window serialization does not work.
|
||||
let tab = win.gBrowser.selectedTab;
|
||||
promiseTabRestored(tab).then(tabReady);
|
||||
} else {
|
||||
tabReady();
|
||||
}
|
||||
}, url, settings);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user