diff options
Diffstat (limited to 'devtools/client/framework/test/browser_keybindings_01.js')
-rw-r--r-- | devtools/client/framework/test/browser_keybindings_01.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/devtools/client/framework/test/browser_keybindings_01.js b/devtools/client/framework/test/browser_keybindings_01.js index 968c3a3d3d..3f48a5dfa2 100644 --- a/devtools/client/framework/test/browser_keybindings_01.js +++ b/devtools/client/framework/test/browser_keybindings_01.js @@ -97,6 +97,33 @@ add_task(async function () { key.synthesizeKey(); await onPickerStop; ok(true, "picker-stopped event received, highlighter stopped"); + + info( + `Run the keyboard shortcut for ${test.id} with picker shortcut disabled` + ); + await pushPref("devtools.command-button-pick.enabled", false); + + // Switch to another panel to assure the hotkey still opens inspector + await toolbox.selectTool("webconsole"); + await waitUntil(() => toolbox.currentToolId === "webconsole"); + + // Check if picker event times out + const onHasPickerStarted = Promise.race([ + toolbox.nodePicker.once("picker-started").then(() => true), + wait(100).then(() => false), + ]); + + key.synthesizeKey(); + const hasPickerStarted = await onHasPickerStarted; + + ok(!hasPickerStarted, "picker was not started on shortcut"); + is( + toolbox.currentToolId, + "inspector", + "shortcut still switches tab to inspector" + ); + + await pushPref("devtools.command-button-pick.enabled", true); } await onSelectTool; |