Bug 1308526 - fix waiting for the test page to load before trying to use it, r=mikedeboer
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 03 Jan 2017 11:49:33 +0000
changeset 327923 266b78fa3d41dd708f467d2b9fd60ca80a2e6b45
parent 327922 2567348b74b55736c838ab8d8b1ff86f47d8cd2a
child 327924 6f37882e28da2ed6a5cfc2baa66aafc54039faf9
push id31159
push userphilringnalda@gmail.com
push dateThu, 05 Jan 2017 02:29:27 +0000
treeherdermozilla-central@1bf65dbb4d71 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1308526
milestone53.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 1308526 - fix waiting for the test page to load before trying to use it, r=mikedeboer MozReview-Commit-ID: GgafFr5ggGa
dom/base/test/browser_bug1307747.js
--- a/dom/base/test/browser_bug1307747.js
+++ b/dom/base/test/browser_bug1307747.js
@@ -1,16 +1,16 @@
 /* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
 
 var {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
 
 const BASE_URI = "http://mochi.test:8888/browser/dom/base/test/empty.html";
 
 add_task(function* test_initialize() {
-  let tab = gBrowser.addTab(BASE_URI);
+  let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, BASE_URI);
   let browser = gBrowser.getBrowserForTab(tab);
 
   let blob = yield ContentTask.spawn(browser, null, function() {
     let blob = new Blob([new Array(1024*1024).join('123456789ABCDEF')]);
     return blob;
   });
 
   ok(blob, "We have a blob!");