Bug 1495715 - Fix intermittent on browser_jsterm_await_paused; r=Honza.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Fri, 18 Jan 2019 14:49:08 +0000
changeset 454452 0e161fee4d4483d1deaad69db6cf5a5ea59287e9
parent 454451 c586ab9cae6d139d5ce403b56f980be711e8c73c
child 454453 3e975e4b35581bf59856f275d8fe56c7667d8b84
push id35397
push useropoprus@mozilla.com
push dateSat, 19 Jan 2019 03:35:41 +0000
treeherdermozilla-central@57dc8bbbc38f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1495715
milestone66.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 1495715 - Fix intermittent on browser_jsterm_await_paused; r=Honza. Looking at the logs and the screenshots, it seems that the test fails because the debugger is not paused anymore when evluating the await expression, meaning that `foo` is undefined. Here we try to wait for a small bit to give more time for the server to evaluate before resuming. Differential Revision: https://phabricator.services.mozilla.com/D16554
devtools/client/webconsole/test/mochitest/browser_jsterm_await_paused.js
--- a/devtools/client/webconsole/test/mochitest/browser_jsterm_await_paused.js
+++ b/devtools/client/webconsole/test/mochitest/browser_jsterm_await_paused.js
@@ -56,16 +56,19 @@ async function performTests() {
 
   const onAwaitResultMessage = waitForMessage(hud, `[ "res", "bar" ]`, ".message.result");
   jsterm.execute(awaitExpression);
   // We send an evaluation just after the await one to ensure the await evaluation was
   // done. We can't await on the previous execution because it waits for the result to
   // be send, which won't happen until we resume the debugger.
   await jsterm.execute(`"smoke"`);
 
+  // Give the engine some time to evaluate the await expression before resuming.
+  await waitForTick();
+
   // Click on the resume button to not be paused anymore.
   await resume(dbg);
 
   await onAwaitResultMessage;
   const messages = hud.ui.outputNode.querySelectorAll(".message.result .message-body");
   const messagesText = Array.from(messages).map(n => n.textContent);
   const expectedMessages = [
     // Result of "smoke"