summaryrefslogtreecommitdiffstats
path: root/dom/html/test/test_bug556645.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/html/test/test_bug556645.html
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-upstream/125.0.1.tar.xz
firefox-upstream/125.0.1.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/html/test/test_bug556645.html')
-rw-r--r--dom/html/test/test_bug556645.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/dom/html/test/test_bug556645.html b/dom/html/test/test_bug556645.html
index 3c308f9ef6..08a230370f 100644
--- a/dom/html/test/test_bug556645.html
+++ b/dom/html/test/test_bug556645.html
@@ -56,10 +56,12 @@ function runTest(aObjectOrEmbed)
const pbutton = document.getElementById("pbutton");
pbutton.focus();
- synthesizeKey("KEY_Tab");
- is(document.activeElement, aObjectOrEmbed, `${desc}: focus in parent after tab`);
- is(childDoc.activeElement, childDoc.documentElement, `${desc}: focus in child after tab`);
-
+ let canTabMoveFocusToRootElement = !SpecialPowers.getBoolPref("dom.disable_tab_focus_to_root_element");
+ if (canTabMoveFocusToRootElement) {
+ synthesizeKey("KEY_Tab");
+ is(document.activeElement, aObjectOrEmbed, `${desc}: focus in parent after tab`);
+ is(childDoc.activeElement, childDoc.documentElement, `${desc}: focus in child after tab`);
+ }
synthesizeKey("KEY_Tab");
is(document.activeElement, aObjectOrEmbed, `${desc}: focus in parent after tab 2`);
is(childDoc.activeElement, button, `${desc}: focus in child after tab 2`);