|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <title>Text Range 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 <script type="application/javascript" |
|
11 src="../common.js"></script> |
|
12 <script type="application/javascript" |
|
13 src="../text.js"></script> |
|
14 <script type="application/javascript"> |
|
15 |
|
16 function doTest() |
|
17 { |
|
18 var input = getAccessible("input", [ nsIAccessibleText ]); |
|
19 testTextRange(input.enclosingRange, input, 0, input, 1); |
|
20 |
|
21 var ta = getAccessible("textarea", [ nsIAccessibleText ]); |
|
22 testTextRange(ta.enclosingRange, ta, 0, ta, 1); |
|
23 |
|
24 var iframeDoc = getAccessible(getNode("iframe").contentDocument, |
|
25 [ nsIAccessibleText ]); |
|
26 testTextRange(iframeDoc.enclosingRange, iframeDoc, 0, iframeDoc, 1); |
|
27 |
|
28 SimpleTest.finish(); |
|
29 } |
|
30 |
|
31 SimpleTest.waitForExplicitFinish(); |
|
32 addA11yLoadEvent(doTest); |
|
33 </script> |
|
34 </head> |
|
35 <body> |
|
36 |
|
37 <a target="_blank" |
|
38 title="Implement Text accessible text range methods" |
|
39 href="https://bugzilla.mozilla.org/show_bug.cgi?id=975065">Bug 975065</a> |
|
40 <p id="display"></p> |
|
41 <div id="content" style="display: none"></div> |
|
42 <pre id="test"> |
|
43 </pre> |
|
44 |
|
45 <input id="input" value="hello"> |
|
46 <textarea id="textarea">hello</textarea> |
|
47 <iframe id="iframe" src="data:text/html,<p>hello</p>"></iframe> |
|
48 |
|
49 </body> |
|
50 </html> |