author | moby <mvonbriesen@mozilla.com> |
Wed, 25 May 2016 14:42:00 -0400 | |
changeset 299119 | f0ad74c19f64d4f1b72375056fa4994da7262cc2 |
parent 299118 | b71c1dcf988a9da071b5c7dec62923f42e156977 |
child 299120 | 91a78f4ce6fa709366cc84ee43e0c21a788042fa |
push id | 30290 |
push user | ryanvm@gmail.com |
push date | Fri, 27 May 2016 01:44:20 +0000 |
treeherder | mozilla-central@34ac60e5b29c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bgrins |
bugs | 1256812 |
milestone | 49.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
|
devtools/client/webconsole/test/browser_warn_user_about_replaced_api.js | file | annotate | diff | comparison | revisions |
--- 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; }