diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /devtools/client/framework/test/browser_keybindings_01.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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; |