|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 <head> |
|
4 <title>HTML img 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="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
|
12 |
|
13 <script type="application/javascript" |
|
14 src="../common.js"></script> |
|
15 <script type="application/javascript" |
|
16 src="../role.js"></script> |
|
17 <script type="application/javascript" |
|
18 src="../events.js"></script> |
|
19 |
|
20 <script type="application/javascript"> |
|
21 //gA11yEventDumpToConsole = true; |
|
22 function doPreTest() |
|
23 { |
|
24 waitForImageMap("imgmap", doTest); |
|
25 } |
|
26 |
|
27 function doTest() |
|
28 { |
|
29 // image map |
|
30 var accTree = { |
|
31 role: ROLE_IMAGE_MAP, |
|
32 children: [ |
|
33 { |
|
34 role: ROLE_LINK, |
|
35 children: [] |
|
36 }, |
|
37 { |
|
38 role: ROLE_LINK, |
|
39 children: [] |
|
40 } |
|
41 ] |
|
42 }; |
|
43 |
|
44 testAccessibleTree("imgmap", accTree); |
|
45 |
|
46 // img |
|
47 accTree = { |
|
48 role: ROLE_GRAPHIC, |
|
49 children: [] |
|
50 }; |
|
51 |
|
52 testAccessibleTree("img", accTree); |
|
53 |
|
54 SimpleTest.finish(); |
|
55 } |
|
56 |
|
57 SimpleTest.waitForExplicitFinish(); |
|
58 addA11yLoadEvent(doPreTest); |
|
59 </script> |
|
60 |
|
61 </head> |
|
62 <body> |
|
63 |
|
64 <a target="_blank" |
|
65 title="Fix O(n^2) access to all the children of a container" |
|
66 href="https://bugzilla.mozilla.org/show_bug.cgi?id=342045"> |
|
67 Mozilla Bug 342045 |
|
68 </a> |
|
69 <p id="display"></p> |
|
70 <div id="content" style="display: none"></div> |
|
71 <pre id="test"> |
|
72 </pre> |
|
73 |
|
74 <map name="atoz_map"> |
|
75 <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#b" |
|
76 coords="17,0,30,14" alt="b" shape="rect"> |
|
77 <area href="http://www.bbc.co.uk/radio4/atoz/index.shtml#a" |
|
78 coords="0,0,13,14" alt="a" shape="rect"> |
|
79 </map> |
|
80 |
|
81 <img id="imgmap" width="447" height="15" |
|
82 usemap="#atoz_map" |
|
83 src="../letters.gif"> |
|
84 |
|
85 <img id="img" src="../moz.png"> |
|
86 |
|
87 </body> |
|
88 </html> |