Bug 1437714 - Wait for 'picker-stopped' event before starting the new picker in the next test case. r?hiro
MozReview-Commit-ID: LUayN3GM2BK
--- 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");
}