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/bounds/test_select.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/bounds/test_select.html')
-rw-r--r-- | accessible/tests/mochitest/bounds/test_select.html | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/accessible/tests/mochitest/bounds/test_select.html b/accessible/tests/mochitest/bounds/test_select.html new file mode 100644 index 000000000..395dad1b6 --- /dev/null +++ b/accessible/tests/mochitest/bounds/test_select.html @@ -0,0 +1,85 @@ +<!DOCTYPE html> +<html> +<head> + <title>Accessible boundaries when page is zoomed</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="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> + + <script type="application/javascript" + src="../common.js"></script> + <script type="application/javascript" + src="../role.js"></script> + <script type="application/javascript" + src="../layout.js"></script> + <script type="application/javascript" + src="../events.js"></script> + + <script type="application/javascript"> + function openComboboxNCheckBounds(aID) + { + this.combobox = getAccessible(aID); + this.comboboxList = this.combobox.firstChild; + this.comboboxOption = this.comboboxList.firstChild; + + this.eventSeq = [ + new invokerChecker(EVENT_FOCUS, this.comboboxOption) + ]; + + this.invoke = function openComboboxNCheckBounds_invoke() + { + getNode(aID).focus(); + synthesizeKey("VK_DOWN", { altKey: true }); + } + + this.finalCheck = function openComboboxNCheckBounds_invoke() + { + testBounds(this.comboboxOption); + } + + this.getID = function openComboboxNCheckBounds_getID() + { + return "open combobox and test boundaries"; + } + } + + //gA11yEventDumpToConsole = true; + + var gQueue = null; + + function doTest() + { + // Combobox + testBounds("combobox"); + + // Option boundaries matches to combobox boundaries when collapsed. + var selectBounds = getBoundsForDOMElm("combobox"); + testBounds("option1", selectBounds); + + // Open combobox and test option boundaries. + gQueue = new eventQueue(); + gQueue.push(new openComboboxNCheckBounds("combobox")); + gQueue.invoke(); // Will call SimpleTest.finish(); + } + + SimpleTest.waitForExplicitFinish(); + addA11yLoadEvent(doTest); + </script> +</head> +<body> + + <p id="display"></p> + <div id="content" style="display: none"></div> + <pre id="test"> + </pre> + + <select id="combobox"> + <option id="option1">item1</option> + <option>item2</option> + </select> +</body> +</html> |