author | Sami Jaktholm <sjakthol@outlook.com> |
Sat, 30 Jul 2016 13:35:36 +0300 | |
changeset 307828 | 2c625c92b5fcb9969b45966e34b266d5cf64e1e1 |
parent 307827 | 457ebb2b73adfed9dc9ff8c1ccaa38723471b59e |
child 307829 | 5e776b32b7c22e24fcd6b1e71f38a9f0530b562d |
push id | 31034 |
push user | cbook@mozilla.com |
push date | Wed, 03 Aug 2016 15:09:36 +0000 |
treeherder | autoland@8ceb6981305f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bgrins |
bugs | 1270234 |
milestone | 51.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_bug664688_sandbox_update_after_navigation.js | file | annotate | diff | comparison | revisions |
--- a/devtools/client/webconsole/test/browser_bug664688_sandbox_update_after_navigation.js +++ b/devtools/client/webconsole/test/browser_bug664688_sandbox_update_after_navigation.js @@ -67,27 +67,34 @@ add_task(function* () { category: CATEGORY_OUTPUT, }, ], }); is(hud.outputNode.textContent.indexOf("Permission denied"), -1, "no permission denied errors"); + // Navigation clears messages. Wait for that clear to happen before + // continuing the test or it might destroy messages we wait later on (Bug + // 1270234). + let cleared = hud.jsterm.once("messages-cleared"); + gBrowser.goBack(); + info("Waiting for page to navigate"); yield waitForSuccess({ name: "go back", validator: function () { return content.location.href == TEST_URI1; }, }); - hud.jsterm.clearOutput(); - executeSoon(() => { - hud.jsterm.execute("window.location.href"); - }); + info("Waiting for messages to be cleared due to navigation"); + yield cleared; + + info("Messages cleared after navigation; checking location"); + hud.jsterm.execute("window.location.href"); info("wait for window.location.href after goBack()"); yield waitForMessages(msgForLocation1); is(hud.outputNode.textContent.indexOf("Permission denied"), -1, "no permission denied errors"); });