Bug 1140221: Attempt to fix intermittent test-tabs.js.testIgnoreClosing by waiting for focus directly. r=erikvold

This commit is contained in:
Dave Townsend 2015-04-20 08:53:00 -07:00
parent f3513faeea
commit 089ca8bdcd

View File

@ -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