Bug 1256812 - Fix ESLint issues in devtools/client/webconsole/test/browser_warn_user_about_replaced_api.js. r=bgrins
authormoby <mvonbriesen@mozilla.com>
Wed, 25 May 2016 14:42:00 -0400
changeset 338109 f0ad74c19f64d4f1b72375056fa4994da7262cc2
parent 338108 b71c1dcf988a9da071b5c7dec62923f42e156977
child 338110 91a78f4ce6fa709366cc84ee43e0c21a788042fa
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1256812
milestone49.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 1256812 - Fix ESLint issues in devtools/client/webconsole/test/browser_warn_user_about_replaced_api.js. r=bgrins
devtools/client/webconsole/test/browser_warn_user_about_replaced_api.js
--- a/devtools/client/webconsole/test/browser_warn_user_about_replaced_api.js
+++ b/devtools/client/webconsole/test/browser_warn_user_about_replaced_api.js
@@ -15,17 +15,17 @@ add_task(function* () {
   Services.prefs.setBoolPref(PREF, true);
 
   let { browser } = yield loadTab(TEST_URI);
   let hud = yield openConsole();
 
   yield testWarningNotPresent(hud);
 
   let loaded = loadBrowser(browser);
-  content.location = TEST_REPLACED_API_URI;
+  BrowserTestUtils.loadURI(browser, TEST_REPLACED_API_URI);
   yield loaded;
 
   let hud2 = yield openConsole();
 
   yield testWarningPresent(hud2);
 
   Services.prefs.clearUserPref(PREF);
 });
@@ -33,17 +33,20 @@ add_task(function* () {
 function testWarningNotPresent(hud) {
   let deferred = promise.defer();
 
   is(hud.outputNode.textContent.indexOf("logging API"), -1,
      "no warning displayed");
 
   // Bug 862024: make sure the warning doesn't show after page reload.
   info("reload " + TEST_URI);
-  executeSoon(() => content.location.reload());
+  executeSoon(function () {
+    let browser = gBrowser.selectedBrowser;
+    ContentTask.spawn(browser, null, "() => content.location.reload()");
+  });
 
   waitForMessages({
     webconsole: hud,
     messages: [{
       text: "testscript.js",
       category: CATEGORY_NETWORK,
     }],
   }).then(() => executeSoon(() => {
@@ -69,14 +72,15 @@ function testWarningPresent(hud) {
   };
 
   waitForMessages(warning).then(() => {
     hud.jsterm.clearOutput();
 
     executeSoon(() => {
       info("reload the test page and wait for the warning to show");
       waitForMessages(warning).then(deferred.resolve);
-      content.location.reload();
+      let browser = gBrowser.selectedBrowser;
+      ContentTask.spawn(browser, null, "() => content.location.reload()");
     });
   });
 
   return deferred.promise;
 }