accessible/tests/mochitest/editabletext/test_2.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:073e56c5690c
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" />
7
8 <script type="application/javascript"
9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10
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>
17
18 <script type="application/javascript">
19 function doTest()
20 {
21 var et = new editableTextTest("input");
22
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);
30
31 et.scheduleTest(et.deleteText, 1, 3, "hlo");
32 et.scheduleTest(et.pasteText, 1, "heelo");
33
34 var testRun = new editableTextTestRun();
35 testRun.add(et);
36 testRun.run(); // Will call SimpleTest.finish();
37 }
38
39 SimpleTest.waitForExplicitFinish();
40 addA11yLoadEvent(doTest);
41 </script>
42 </head>
43 <body>
44
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>
59
60 <input id="input" value="hello"/>
61
62 </body>
63 </html>

mercurial