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 348286 8e998fdc243d88818f6f11c0455071ad439b0d92
parent 348285 b9d180c51943b413f2819cb481fdd25e48574950
child 348287 d140a7a856b7cacf04ed8e216d13bbb5ef346906
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1311197
milestone52.0a1
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() {