mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1262710 - Don't use CPOW in devtools/server/test/browser tests when adding a tab; r=ochameau
MozReview-Commit-ID: DFJvufMBTjn --HG-- extra : rebase_source : 1366bc929067f6c7bbd5f944f973101bf3af9d7c
This commit is contained in:
parent
6b557997b2
commit
23a6760a0b
@ -31,19 +31,11 @@ waitForExplicitFinish();
|
||||
* and Promises cannot be resolved with CPOWs (see bug 1233497).
|
||||
*/
|
||||
var addTab = Task.async(function* (url) {
|
||||
info("Adding a new tab with URL: '" + url + "'");
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab();
|
||||
let loaded = once(gBrowser.selectedBrowser, "load", true);
|
||||
info(`Adding a new tab with URL: ${url}`);
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab(url);
|
||||
yield once(gBrowser.selectedBrowser, "load", true);
|
||||
|
||||
content.location = url;
|
||||
yield loaded;
|
||||
|
||||
info("URL '" + url + "' loading complete");
|
||||
|
||||
yield new Promise(resolve => {
|
||||
let isBlank = url == "about:blank";
|
||||
waitForFocus(resolve, content, isBlank);
|
||||
});
|
||||
info(`Tab added and URL ${url} loaded`);
|
||||
|
||||
return tab.linkedBrowser;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user