|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 |
|
4 <head> |
|
5 <title>Generated content tests</title> |
|
6 <link rel="stylesheet" type="text/css" |
|
7 href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
8 |
|
9 <style> |
|
10 .gentext:before { |
|
11 content: "START" |
|
12 } |
|
13 .gentext:after { |
|
14 content: "END" |
|
15 } |
|
16 </style> |
|
17 |
|
18 <script type="application/javascript" |
|
19 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
20 |
|
21 <script type="application/javascript" |
|
22 src="../common.js"></script> |
|
23 <script type="application/javascript" |
|
24 src="../role.js"></script> |
|
25 |
|
26 <script type="application/javascript"> |
|
27 function doTest() |
|
28 { |
|
29 // :before and :after pseudo styles |
|
30 var accTree = { |
|
31 role: ROLE_SECTION, |
|
32 children: [ |
|
33 { |
|
34 role: ROLE_STATICTEXT, |
|
35 name: "START" |
|
36 }, |
|
37 { |
|
38 role: ROLE_TEXT_LEAF, |
|
39 name: "MIDDLE" |
|
40 }, |
|
41 { |
|
42 role: ROLE_STATICTEXT, |
|
43 name: "END" |
|
44 } |
|
45 ] |
|
46 }; |
|
47 |
|
48 testAccessibleTree("gentext", accTree); |
|
49 |
|
50 SimpleTest.finish(); |
|
51 } |
|
52 |
|
53 SimpleTest.waitForExplicitFinish(); |
|
54 addA11yLoadEvent(doTest); |
|
55 </script> |
|
56 </head> |
|
57 <body> |
|
58 |
|
59 <a target="_blank" |
|
60 title="Clean up our tree walker" |
|
61 href="https://bugzilla.mozilla.org/show_bug.cgi?id=530081"> |
|
62 Mozilla Bug 530081 |
|
63 </a> |
|
64 <p id="display"></p> |
|
65 <div id="content" style="display: none"></div> |
|
66 <pre id="test"> |
|
67 </pre> |
|
68 |
|
69 <div class="gentext" id="gentext">MIDDLE</div> |
|
70 </body> |
|
71 </html> |