diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /accessible/tests/mochitest/jsat/test_hints.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'accessible/tests/mochitest/jsat/test_hints.html')
-rw-r--r-- | accessible/tests/mochitest/jsat/test_hints.html | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/accessible/tests/mochitest/jsat/test_hints.html b/accessible/tests/mochitest/jsat/test_hints.html new file mode 100644 index 000000000..d5691b97a --- /dev/null +++ b/accessible/tests/mochitest/jsat/test_hints.html @@ -0,0 +1,89 @@ +<html> +<head> + <title> [AccessFu] Interaction Hints </title> + + <link rel="stylesheet" type="text/css" + href="chrome://mochikit/content/tests/SimpleTest/test.css" /> + <script type="application/javascript" + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="output.js"></script> + <script type="application/javascript"> + + function doTest() { + var tests = [{ + accOrElmOrID: 'can_wheel', + expectedHints: ['Swipe with two fingers to move between pages'] + }, { + accOrElmOrID: 'nested_link', + expectedHints: [{string: 'link-hint'}, + 'Swipe with two fingers to move between pages'] + }, { + accOrElmOrID: 'nested_link', + oldAccOrElmOrID: 'can_wheel', + expectedHints: [{string: 'link-hint'}] + }, { + accOrElmOrID: 'link_with_default_hint', + expectedHints: [{string: 'link-hint'}] + }, { + accOrElmOrID: 'link_with_hint_override', + expectedHints: ['Tap and hold to get to menu'] + }, { + accOrElmOrID: 'button_with_default_hint', + expectedHints: [{string: 'pushbutton-hint'}] + }, { + accOrElmOrID: 'button_with_hint_override', + expectedHints: ['Tap and hold to activate'] + }, { + accOrElmOrID: 'nested_link2', + expectedHints: [{string: 'link-hint'}] + }, { + accOrElmOrID: 'nested_link3', + expectedHints: [{string: 'link-hint'}, {string: 'pushbutton-hint'}, + "Double tap and hold to activate"] + }, { + accOrElmOrID: 'menuitemradio', + expectedHints: [{string: 'radiomenuitem-hint'}] + }]; + + // Test hints. + tests.forEach(function run(test) { + testHints(test.expectedHints, test.accOrElmOrID, test.oldAccOrElmOrID); + }); + + SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTest); + </script> +</head> +<body> + <div id="root"> + <a target="_blank" + href="https://bugzilla.mozilla.org/show_bug.cgi?id=1069574" + title="[AccessFu] Interaction Hints"> + Mozilla Bug 1069574 + </a> + <p id="display"></p> + <div id="content" style="display: none"></div> + <pre id="test"></pre> + <span role="region" id="can_wheel" aria-moz-hint="Swipe with two fingers to move between pages"> + <a href="#" id="nested_link">I can be clicked</a> + </span> + <span role="region" aria-moz-hint=""> + <a><a href="#" id="nested_link2">I can be clicked</a></a> + </span> + <span role="region" aria-moz-hint="Double tap and hold to activate"> + <button><a href="#" id="nested_link3">I can be clicked</a></button> + </span> + <a href="#" id="link_with_default_hint">I can be clicked</a> + <a href="#" id="link_with_hint_override" aria-moz-hint="Tap and hold to get to menu">I am a special link</a> + <button id="button_with_default_hint">Toggle</button> + <button id="button_with_hint_override" aria-moz-hint="Tap and hold to activate">Special</button> + <span id="menuitemradio" role="menuitemradio">Item 1</span> + </div> +</body> +</html> |