mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1140221: Attempt to fix intermittent test-tabs.js.testIgnoreClosing by waiting for focus directly. r=erikvold
This commit is contained in:
parent
f3513faeea
commit
089ca8bdcd
@ -371,8 +371,9 @@ exports.testTabMove = function(assert, done) {
|
||||
};
|
||||
|
||||
exports.testIgnoreClosing = function(assert, done) {
|
||||
let originalWindow = browserWindows.activeWindow;
|
||||
let originalWindow = viewFor(browserWindows.activeWindow);
|
||||
openBrowserWindow(function(window, browser) {
|
||||
onFocus(window).then(() => {
|
||||
let url = "data:text/html;charset=utf-8,foobar";
|
||||
|
||||
assert.equal(tabs.length, 2, "should be two windows open each with one tab");
|
||||
@ -388,13 +389,13 @@ exports.testIgnoreClosing = function(assert, done) {
|
||||
assert.equal(win.tabs.length, 1, "should be one tab in the new window");
|
||||
assert.equal(tabs.length, 2, "should be two tabs in total");
|
||||
|
||||
originalWindow.once("activate", done);
|
||||
close(window);
|
||||
close(window).then(onFocus(originalWindow)).then(done).then(null, assert.fail);
|
||||
});
|
||||
});
|
||||
|
||||
tabs.open(url);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// TEST: open tab with default options
|
||||
|
Loading…
Reference in New Issue
Block a user