Bug 1307676 - "Intermittent browser/base/content/test/urlbar/browser_urlbarCopying.js | loaded expected URL - Got about:blank, expected http://example.com/". r=mak77, a=test-only
authorKaffeekaethe <katharina.utecht@student.hpi.uni-potsdam.de>
Sat, 29 Oct 2016 07:09:00 +0200
changeset 356412 1c6f2c0c5b6ac1631783f0efba56484a1958a66a
parent 356411 dc6a446a6aa6ce6282aace7b3f6cb84ac94e0ecf
child 356413 ab1c20fce32c582afe6d03a29f72dcf48946c23b
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak77, test-only
bugs1307676
milestone51.0a2
Bug 1307676 - "Intermittent browser/base/content/test/urlbar/browser_urlbarCopying.js | loaded expected URL - Got about:blank, expected http://example.com/". r=mak77, a=test-only
browser/base/content/test/urlbar/browser_urlbarCopying.js
--- a/browser/base/content/test/urlbar/browser_urlbarCopying.js
+++ b/browser/base/content/test/urlbar/browser_urlbarCopying.js
@@ -189,16 +189,11 @@ function testCopy(copyVal, targetValue, 
       gURLBar.select();
     }
 
     goDoCommand("cmd_copy");
   }, cb, cb);
 }
 
 function loadURL(aURL, aCB) {
-  gBrowser.selectedBrowser.addEventListener("load", function () {
-    gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
-    is(gBrowser.currentURI.spec, aURL, "loaded expected URL");
-    aCB();
-  }, true);
-
-  gBrowser.loadURI(aURL);
+  BrowserTestUtils.loadURI(gBrowser.selectedBrowser, aURL);
+  BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, aURL).then(aCB);
 }