Bug 1308526 - fix waiting for the test page to load before trying to use it, r=mikedeboer, a=test-only
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 03 Jan 2017 11:49:33 +0000
changeset 353392 606a494135d444149c19ee80eef3a78c068fa030
parent 353391 d77136af6dd5f7f80bb602decfe929204c30439f
child 353393 04544accd96ac3fa43a676dc5a6f8c116b08271f
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, test-only
bugs1308526
milestone52.0a2
Bug 1308526 - fix waiting for the test page to load before trying to use it, r=mikedeboer, a=test-only 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!");