diff options
Diffstat (limited to 'devtools/client/shared/test/browser_autocomplete_popup_input.js')
-rw-r--r-- | devtools/client/shared/test/browser_autocomplete_popup_input.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/devtools/client/shared/test/browser_autocomplete_popup_input.js b/devtools/client/shared/test/browser_autocomplete_popup_input.js index a7d04f1c9c..32fc6da25e 100644 --- a/devtools/client/shared/test/browser_autocomplete_popup_input.js +++ b/devtools/client/shared/test/browser_autocomplete_popup_input.js @@ -19,7 +19,8 @@ add_task(async function () { const { doc } = await createHost(); const input = doc.createElement("input"); - doc.body.append(input, doc.createElement("input")); + const prevInput = doc.createElement("input"); + doc.body.append(prevInput, input, doc.createElement("input")); const onSelectCalled = []; const onClickCalled = []; @@ -189,7 +190,9 @@ add_task(async function () { ); EventUtils.synthesizeKey("KEY_Tab", { shiftKey: true }); is(onClickCalled.length, 3, "onClick wasn't called"); + is(hasFocus(input), false, "input does not have the focus anymore"); + is(hasFocus(prevInput), true, "Shift+Tab moves the focus to prevInput"); const onPopupClose = popup.once("popup-closed"); popup.hidePopup(); |