Bug 1496572 - Fix intermittent devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-xul.js by adding a new emitted event for the inspector toolbar update. r=pbro

This commit is contained in:
Gabriel Luong 2018-10-13 06:53:00 +03:00
parent 7c6f8bf9fb
commit 40306dcbc5
2 changed files with 4 additions and 0 deletions

View File

@ -1129,6 +1129,8 @@ Inspector.prototype = {
eyeDropperButton.disabled = true;
eyeDropperButton.title = INSPECTOR_L10N.getStr("eyedropper.disabled.title");
}
this.emit("inspector-toolbar-updated");
},
teardownToolbar: function() {

View File

@ -35,7 +35,9 @@ add_task(async function() {
ok(isDisabled(button), "The button is disabled in the color picker");
info("Navigate to a HTML document");
const toolbarUpdated = inspector.once("inspector-toolbar-updated");
await navigateTo(inspector, TEST_URL_2);
await toolbarUpdated;
info("Check the inspector toolbar in HTML document");
button = inspector.panelDoc.querySelector("#inspector-eyedropper-toggle");