Bug 1311197 - Remove a shim use from devtools tests. r=Gijs
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 18 Oct 2016 14:12:51 -0700
changeset 321593 8e998fdc243d88818f6f11c0455071ad439b0d92
parent 321592 b9d180c51943b413f2819cb481fdd25e48574950
child 321594 d140a7a856b7cacf04ed8e216d13bbb5ef346906
push id30931
push userkwierso@gmail.com
push dateTue, 08 Nov 2016 21:58:36 +0000
treeherdermozilla-central@783356f1476e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1311197
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1311197 - Remove a shim use from devtools tests. r=Gijs MozReview-Commit-ID: LXfgna5sb9s
devtools/client/webconsole/test/head.js
--- a/devtools/client/webconsole/test/head.js
+++ b/devtools/client/webconsole/test/head.js
@@ -56,24 +56,17 @@ function loadTab(url) {
     browser.removeEventListener("load", onLoad, true);
     deferred.resolve({tab: tab, browser: browser});
   }, true);
 
   return deferred.promise;
 }
 
 function loadBrowser(browser) {
-  let deferred = promise.defer();
-
-  browser.addEventListener("load", function onLoad() {
-    browser.removeEventListener("load", onLoad, true);
-    deferred.resolve(null);
-  }, true);
-
-  return deferred.promise;
+  return BrowserTestUtils.browserLoaded(browser);
 }
 
 function closeTab(tab) {
   let deferred = promise.defer();
 
   let container = gBrowser.tabContainer;
 
   container.addEventListener("TabClose", function onTabClose() {