Wed, 31 Dec 2014 06:09:35 +0100
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="Tests: XUL label text interface">
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"></script>
14 <script type="application/javascript"
15 src="../common.js"></script>
16 <script type="application/javascript"
17 src="../role.js"></script>
18 <script type="application/javascript"
19 src="../text.js"></script>
21 <script type="application/javascript">
22 <![CDATA[
23 ////////////////////////////////////////////////////////////////////////////
24 // Testing
26 var gQueue = null;
27 function doTests()
28 {
29 //////////////////////////////////////////////////////////////////////////
30 // XUL label
32 var ids = ["label1", "label2"];
34 testCharacterCount(ids, 5);
36 testText(ids, 0, -1, "Hello");
37 testText(ids, 0, 1, "H");
39 testCharAfterOffset(ids, 0, "e", 1, 2);
40 testCharBeforeOffset(ids, 1, "H", 0, 1);
41 testCharAtOffset(ids, 1, "e", 1, 2);
43 //////////////////////////////////////////////////////////////////////////
44 // XUL textbox
46 testTextAtOffset([ getNode("tbox1").inputField ], BOUNDARY_LINE_START,
47 [ [ 0, 4, "test", 0, 4 ] ]);
49 SimpleTest.finish();
50 }
52 SimpleTest.waitForExplicitFinish();
53 addA11yLoadEvent(doTests);
54 ]]>
55 </script>
57 <vbox flex="1" style="overflow: auto;">
58 <body xmlns="http://www.w3.org/1999/xhtml">
59 <a target="_blank"
60 href="https://bugzilla.mozilla.org/show_bug.cgi?id=396166"
61 title="xul:label@value accessible should implement nsIAccessibleText">
62 Bug 396166
63 </a>
64 <a target="_blank"
65 href="https://bugzilla.mozilla.org/show_bug.cgi?id=899433"
66 title="Accessibility returns empty line for last line in certain cases">
67 Bug 899433
68 </a>
69 <p id="display"></p>
70 <div id="content" style="display: none">
71 </div>
72 <pre id="test">
73 </pre>
74 </body>
75 <label id="label1" value="Hello"/>
76 <label id="label2">Hello</label>
78 <textbox id="tbox1" value="test" multiline="true"/>
79 </vbox>
80 </window>