mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Bug 1052750 - try to fix intermittent timeouts in browser urlbar search test by waiting for focus on the newly opened window, rs=firebot
This commit is contained in:
parent
18a50dd690
commit
c9a9e21bb2
@ -65,7 +65,15 @@ add_task(function* test_navigate_full_domain() {
|
||||
function get_test_function_for_localhost_with_hostname(hostName, isPrivate) {
|
||||
return function* test_navigate_single_host() {
|
||||
const pref = "browser.fixup.domainwhitelist.localhost";
|
||||
let win = isPrivate ? yield promiseOpenAndLoadWindow({private: true}, true) : window;
|
||||
let win;
|
||||
if (isPrivate) {
|
||||
win = yield promiseOpenAndLoadWindow({private: true}, true);
|
||||
let deferredOpenFocus = Promise.defer();
|
||||
waitForFocus(deferredOpenFocus.resolve, win);
|
||||
yield deferredOpenFocus.promise;
|
||||
} else {
|
||||
win = window;
|
||||
}
|
||||
let browser = win.gBrowser;
|
||||
let tab = browser.selectedTab = browser.addTab();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user