Bug 1343955 - part 0: Fix bug of browser_panel_keyboard_navigation.js r=smaug

browser_panel_keyboard_navigation.js sets "Tab" to first argument of
EventUtils.synthesizeKey().  However, this causes inputting "T", "a", "b" with
a key press.  The test intended to emulate pressing the "Tab" key.  So, it
should be "KEY_Tab".

Note that this will cause permanent orange with the following patches since
synthesizeKey() will detect this kind of mistake.

Differential Revision: https://phabricator.services.mozilla.com/D7412

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Masayuki Nakano 2018-10-02 14:21:11 +00:00
parent 93ff477188
commit 3a7b6f337e

View File

@ -180,7 +180,7 @@ add_task(async function testTabKey() {
let button = buttons[i];
if (button.disabled)
continue;
EventUtils.synthesizeKey("Tab", {shiftKey: true});
EventUtils.synthesizeKey("KEY_Tab", {shiftKey: true});
Assert.equal(document.commandDispatcher.focusedElement, button,
"The correct button should be focused after shift + tabbing");
}