summaryrefslogtreecommitdiffstats
path: root/devtools/client/framework/test/browser_keybindings_01.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/framework/test/browser_keybindings_01.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 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.js27
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;