summaryrefslogtreecommitdiffstats
path: root/layout/reftests/xul/accesskey.xhtml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/xul/accesskey.xhtml
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/xul/accesskey.xhtml')
-rw-r--r--layout/reftests/xul/accesskey.xhtml42
1 files changed, 42 insertions, 0 deletions
diff --git a/layout/reftests/xul/accesskey.xhtml b/layout/reftests/xul/accesskey.xhtml
new file mode 100644
index 0000000000..1bbd2810e9
--- /dev/null
+++ b/layout/reftests/xul/accesskey.xhtml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
+
+<!-- This test checks that access keys are rendered properly, both when set with the
+ accesskey attribute in the markup and updated via script later.
+ -->
+<window class="reftest-wait" onload="changeKeys()"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<script>
+<![CDATA[
+
+var keys = ['L', 'l', 'b', 'x', 'l'];
+
+function changeKeys()
+{
+ var box = document.getElementById('d');
+ for (var b = 0; b < 5; b++)
+ box.childNodes[b * 2].accessKey = keys[b];
+
+ document.documentElement.className='';
+}
+
+]]>
+</script>
+
+<hbox align="start">
+ <label control="b1" accesskey="L">Label1</label><input xmlns="http://www.w3.org/1999/xhtml" id="b1" size="2"/>
+ <label control="b2" accesskey="l">Label2</label><input xmlns="http://www.w3.org/1999/xhtml" id="b2" size="2"/>
+ <label control="b3" accesskey="b">Label3</label><input xmlns="http://www.w3.org/1999/xhtml" id="b3" size="2"/>
+ <label control="b4" accesskey="x">Label4</label><input xmlns="http://www.w3.org/1999/xhtml" id="b4" size="2"/>
+ <label control="b5" accesskey="l" maxwidth="50">Quite a long label. Hopefully it will wrap</label><input xmlns="http://www.w3.org/1999/xhtml" id="b5" size="2"/>
+</hbox>
+
+<hbox id="d" align="start">
+ <label control="d1" accesskey="z">Label1</label><input xmlns="http://www.w3.org/1999/xhtml" id="d1" size="2"/>
+ <label control="d2">Label2</label><input xmlns="http://www.w3.org/1999/xhtml" id="d2" size="2"/>
+ <label control="d3" accesskey="t">Label3</label><input xmlns="http://www.w3.org/1999/xhtml" id="d3" size="2"/>
+ <label control="d4" accesskey="b">Label4</label><input xmlns="http://www.w3.org/1999/xhtml" id="d4" size="2"/>
+ <label control="d5" accesskey="l" maxwidth="50">Quite a long label. Hopefully it will wrap</label><input xmlns="http://www.w3.org/1999/xhtml" id="d5" size="2"/>
+</hbox>
+
+</window>