accessible/tests/mochitest/editabletext/test_2.html

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 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>nsIAccessibleEditableText chrome tests</title>
     5   <link rel="stylesheet" type="text/css"
     6         href="chrome://mochikit/content/tests/SimpleTest/test.css" />
     8   <script type="application/javascript"
     9           src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
    11   <script type="application/javascript"
    12           src="../common.js"></script>
    13   <script type="application/javascript"
    14           src="../events.js"></script>
    15   <script type="application/javascript"
    16           src="editabletext.js"></script>
    18   <script type="application/javascript">
    19     function doTest()
    20     {
    21       var et = new editableTextTest("input");
    23       // 'ee' insertion/removal at 1 or 2 offset of 'hello'/'heeello' string
    24       // reports 'ee' text was inserted/removed at 2 offset.
    25       et.scheduleTest(et.insertText, "ee", 1, "heeello", 2);
    26       et.scheduleTest(et.copyText, 1, 3, "ee");
    27       et.scheduleTest(et.cutText, 1, 3, "hello", 2, 4);
    28       et.scheduleTest(et.insertText, "ee", 2, "heeello", 2);
    29       et.scheduleTest(et.cutText, 2, 4, "hello", 2, 4);
    31       et.scheduleTest(et.deleteText, 1, 3, "hlo");
    32       et.scheduleTest(et.pasteText, 1, "heelo");
    34       var testRun = new editableTextTestRun();
    35       testRun.add(et);
    36       testRun.run(); // Will call SimpleTest.finish();
    37     }
    39     SimpleTest.waitForExplicitFinish();
    40     addA11yLoadEvent(doTest);
    41   </script>
    42 </head>
    43 <body>
    45   <a target="_blank"
    46      title="HyperText accessible should get focus when the caret is positioned inside of it, text is changed or copied into clipboard by ATs"
    47      href="https://bugzilla.mozilla.org/show_bug.cgi?id=524115">
    48     Mozilla Bug 524115
    49   </a>
    50   <a target="_blank"
    51      title="Cache rendered text on a11y side"
    52      href="https://bugzilla.mozilla.org/show_bug.cgi?id=626660">
    53     Mozilla Bug 626660
    54   </a>
    55   <p id="display"></p>
    56   <div id="content" style="display: none"></div>
    57   <pre id="test">
    58   </pre>
    60   <input id="input" value="hello"/>
    62 </body>
    63 </html>

mercurial