Bug 1437714 - Wait for 'picker-stopped' event before starting the new picker in the next test case. r?hiro draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sat, 17 Feb 2018 07:22:49 +0900
changeset 756358 d6dd1f32f489544f784b9183bf4fb91a8bbc43ce
parent 756093 f01d1def46fb53a6523768c6e9188e66b89e664e
child 756441 02dc8be2fab92ad37dc1881a16d7d550ca6586c3
push id99482
push userhikezoe@mozilla.com
push dateFri, 16 Feb 2018 22:23:02 +0000
reviewershiro
bugs1437714
milestone60.0a1
Bug 1437714 - Wait for 'picker-stopped' event before starting the new picker in the next test case. r?hiro MozReview-Commit-ID: LUayN3GM2BK
devtools/client/inspector/test/browser_inspector_highlighter-keybinding_03.js
--- a/devtools/client/inspector/test/browser_inspector_highlighter-keybinding_03.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-keybinding_03.js
@@ -42,17 +42,18 @@ add_task(function* () {
   is(inspector.selection.nodeFront.id, "another",
      "The #another DIV is still selected. Passed.");
 
   function doKeyPick(args) {
     info("Key pressed. Waiting for element to be picked");
     testActor.synthesizeKey(args);
     return promise.all([
       inspector.selection.once("new-node-front"),
-      inspector.once("inspector-updated")
+      inspector.once("inspector-updated"),
+      inspector.toolbox.once("picker-stopped")
     ]);
   }
 
   function doKeyStop(args) {
     info("Key pressed. Waiting for picker to be canceled");
     testActor.synthesizeKey(args);
     return inspector.toolbox.once("picker-stopped");
   }