accessible/tests/mochitest/events/test_caretmove.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial