|
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"?> |
|
5 |
|
6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
7 title="Accessible XUL tree attributes tests"> |
|
8 |
|
9 <script type="application/javascript" |
|
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
|
11 |
|
12 <script type="application/javascript" |
|
13 src="../treeview.js" /> |
|
14 |
|
15 <script type="application/javascript" |
|
16 src="../common.js" /> |
|
17 <script type="application/javascript" |
|
18 src="../attributes.js" /> |
|
19 <script type="application/javascript" |
|
20 src="../events.js" /> |
|
21 |
|
22 <script type="application/javascript"> |
|
23 <![CDATA[ |
|
24 //////////////////////////////////////////////////////////////////////////// |
|
25 // Test |
|
26 |
|
27 function doTest() |
|
28 { |
|
29 var treeNode = getNode("tree"); |
|
30 |
|
31 var tree = getAccessible(treeNode); |
|
32 var treeitem1 = tree.firstChild.nextSibling; |
|
33 testGroupAttrs(treeitem1, 1, 4, 1); |
|
34 |
|
35 var treeitem2 = treeitem1.nextSibling; |
|
36 testGroupAttrs(treeitem2, 2, 4, 1); |
|
37 |
|
38 var treeitem3 = treeitem2.nextSibling; |
|
39 testGroupAttrs(treeitem3, 1, 2, 2); |
|
40 |
|
41 var treeitem4 = treeitem3.nextSibling; |
|
42 testGroupAttrs(treeitem4, 2, 2, 2); |
|
43 |
|
44 var treeitem5 = treeitem4.nextSibling; |
|
45 testGroupAttrs(treeitem5, 3, 4, 1); |
|
46 |
|
47 var treeitem6 = treeitem5.nextSibling; |
|
48 testGroupAttrs(treeitem6, 4, 4, 1); |
|
49 |
|
50 SimpleTest.finish(); |
|
51 } |
|
52 |
|
53 SimpleTest.waitForExplicitFinish(); |
|
54 addA11yXULTreeLoadEvent(doTest, "tree", new nsTreeTreeView()); |
|
55 ]]> |
|
56 </script> |
|
57 |
|
58 <hbox flex="1" style="overflow: auto;"> |
|
59 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
60 <a target="_blank" |
|
61 href="https://bugzilla.mozilla.org/show_bug.cgi?id=503727" |
|
62 title="Reorganize implementation of XUL tree accessibility"> |
|
63 Mozilla Bug 503727 |
|
64 </a><br/> |
|
65 <p id="display"></p> |
|
66 <div id="content" style="display: none"> |
|
67 </div> |
|
68 <pre id="test"> |
|
69 </pre> |
|
70 </body> |
|
71 |
|
72 <vbox flex="1"> |
|
73 <tree id="tree" flex="1"> |
|
74 <treecols> |
|
75 <treecol id="col" flex="1" primary="true" label="column"/> |
|
76 </treecols> |
|
77 <treechildren/> |
|
78 </tree> |
|
79 |
|
80 <vbox id="debug"/> |
|
81 </vbox> |
|
82 </hbox> |
|
83 |
|
84 </window> |
|
85 |