Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 3 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" |
michael@0 | 4 | type="text/css"?> |
michael@0 | 5 | |
michael@0 | 6 | <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 7 | title="Caret move event testing"> |
michael@0 | 8 | |
michael@0 | 9 | <script type="application/javascript" |
michael@0 | 10 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
michael@0 | 11 | <script type="application/javascript" |
michael@0 | 12 | src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> |
michael@0 | 13 | |
michael@0 | 14 | <script type="application/javascript" |
michael@0 | 15 | src="../common.js" /> |
michael@0 | 16 | <script type="application/javascript" |
michael@0 | 17 | src="../events.js" /> |
michael@0 | 18 | |
michael@0 | 19 | <script type="application/javascript"> |
michael@0 | 20 | /** |
michael@0 | 21 | * Do tests. |
michael@0 | 22 | */ |
michael@0 | 23 | |
michael@0 | 24 | //gA11yEventDumpID = "eventdump"; // debug stuff |
michael@0 | 25 | //gA11yEventDumpToConsole = true; |
michael@0 | 26 | |
michael@0 | 27 | var gQueue = null; |
michael@0 | 28 | |
michael@0 | 29 | function doTests() |
michael@0 | 30 | { |
michael@0 | 31 | if (MAC) { |
michael@0 | 32 | todo(false, "Make these tests pass on OSX (bug 650294)"); |
michael@0 | 33 | SimpleTest.finish(); |
michael@0 | 34 | return; |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | gQueue = new eventQueue(EVENT_TEXT_CARET_MOVED); |
michael@0 | 38 | |
michael@0 | 39 | var id = "textbox"; |
michael@0 | 40 | var input = getNode(id).inputField; |
michael@0 | 41 | gQueue.push(new synthFocus(id, new caretMoveChecker(5, input))); |
michael@0 | 42 | gQueue.push(new synthSelectAll(id, new caretMoveChecker(5, input))); |
michael@0 | 43 | gQueue.push(new synthHomeKey(id, new caretMoveChecker(0, input))); |
michael@0 | 44 | gQueue.push(new synthRightKey(id, new caretMoveChecker(1, input))); |
michael@0 | 45 | |
michael@0 | 46 | gQueue.invoke(); // Will call SimpleTest.finish(); |
michael@0 | 47 | } |
michael@0 | 48 | |
michael@0 | 49 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 50 | addA11yLoadEvent(doTests); |
michael@0 | 51 | </script> |
michael@0 | 52 | |
michael@0 | 53 | <hbox flex="1" style="overflow: auto;"> |
michael@0 | 54 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 55 | <a target="_blank" |
michael@0 | 56 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=634240" |
michael@0 | 57 | title="No caret move events are fired for XUL textbox accessible"> |
michael@0 | 58 | Mozilla Bug 634240 |
michael@0 | 59 | </a> |
michael@0 | 60 | <p id="display"></p> |
michael@0 | 61 | <div id="content" style="display: none"></div> |
michael@0 | 62 | <pre id="test"> |
michael@0 | 63 | </pre> |
michael@0 | 64 | </body> |
michael@0 | 65 | |
michael@0 | 66 | <vbox flex="1"> |
michael@0 | 67 | <textbox id="textbox" value="hello"/> |
michael@0 | 68 | |
michael@0 | 69 | <vbox id="eventdump"/> |
michael@0 | 70 | </vbox> |
michael@0 | 71 | </hbox> |
michael@0 | 72 | </window> |