From 23a6760a0b6044d9f1867c5931f35f17e829f0ce Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 8 Jun 2016 09:47:02 +0200 Subject: [PATCH] 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 --- devtools/server/tests/browser/head.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/devtools/server/tests/browser/head.js b/devtools/server/tests/browser/head.js index 9c2e673464fc..41a0def81750 100644 --- a/devtools/server/tests/browser/head.js +++ b/devtools/server/tests/browser/head.js @@ -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; });