Bug 1467407 - Fix incorrect usage of ok() in devtools keyboard nav mochitest;r=yzen
MozReview-Commit-ID: 3LGuqjnWYRA
--- a/devtools/client/framework/test/browser_toolbox_keyboard_navigation.js
+++ b/devtools/client/framework/test/browser_toolbox_keyboard_navigation.js
@@ -102,25 +102,27 @@ add_task(async function() {
// Move the focused tab and select it by using enter key.
let onKeyEvent = once(win, "keydown");
EventUtils.synthesizeKey("KEY_ArrowRight");
await onKeyEvent;
let onceSelected = toolbox.once("webconsole-selected");
EventUtils.synthesizeKey("Enter");
await onceSelected;
- ok(doc.activeElement.id, tabButtons[1].id, "Changed tab button is focused.");
+ is(doc.activeElement.id, "toolbox-panel-iframe-" + toolbox.currentToolId,
+ "Selected tool frame is now focused.");
// Webconsole steal the focus from button after sending "webconsole-selected"
// event.
tabButtons[1].focus();
// Return the focused tab with space key.
onKeyEvent = once(win, "keydown");
EventUtils.synthesizeKey("KEY_ArrowLeft");
await onKeyEvent;
onceSelected = toolbox.once("inspector-selected");
EventUtils.synthesizeKey(" ");
await onceSelected;
- ok(doc.activeElement.id, tabButtons[0].id, "Changed tab button is focused.");
+ is(doc.activeElement.id, "toolbox-panel-iframe-" + toolbox.currentToolId,
+ "Selected tool frame is now focused.");
});