OLD | NEW |
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> | 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
4 <head> | 4 <head> |
5 <script> | 5 <script> |
6 | 6 |
7 var test = 1; | 7 var test = 1; |
8 var map1; | 8 var map1; |
9 var map2; | 9 var map2; |
10 var map3; | 10 var map3; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 map1 = document.getElementsByTagName("map")[1]; | 57 map1 = document.getElementsByTagName("map")[1]; |
58 map2 = document.getElementsByTagName("map")[2]; | 58 map2 = document.getElementsByTagName("map")[2]; |
59 map3 = document.getElementsByTagName("map")[3]; | 59 map3 = document.getElementsByTagName("map")[3]; |
60 | 60 |
61 var numClicks = 7; | 61 var numClicks = 7; |
62 if (!window.eventSender) { | 62 if (!window.eventSender) { |
63 document.getElementById("log").textContent = "To run the test manually,
click " + numClicks + " times in the image rectangle.\n"; | 63 document.getElementById("log").textContent = "To run the test manually,
click " + numClicks + " times in the image rectangle.\n"; |
64 return; | 64 return; |
65 } | 65 } |
66 testRunner.dumpAsText(); | 66 testRunner.dumpAsText(); |
67 // Mouse events only work after an initial layout | |
68 document.body.offsetLeft; | |
69 eventSender.mouseMoveTo(50, 50); | 67 eventSender.mouseMoveTo(50, 50); |
70 for (var click = 0; numClicks > click; ++click) { | 68 for (var click = 0; numClicks > click; ++click) { |
71 eventSender.mouseDown(); | 69 eventSender.mouseDown(); |
72 eventSender.mouseUp(); | 70 eventSender.mouseUp(); |
73 } | 71 } |
74 } | 72 } |
75 | 73 |
76 </script> | 74 </script> |
77 </head> | 75 </head> |
78 <body onload="runTest()"> | 76 <body onload="runTest()"> |
79 <map name="mapName"><area shape="rect" coords="0,0,100,100" onclick="setResult('
0')" /></map> | 77 <map name="mapName"><area shape="rect" coords="0,0,100,100" onclick="setResult('
0')" /></map> |
80 <map name="mapname"><area shape="rect" coords="0,0,100,100" onclick="setResult('
1')" /></map> | 78 <map name="mapname"><area shape="rect" coords="0,0,100,100" onclick="setResult('
1')" /></map> |
81 <map name="mapname"><area shape="rect" coords="0,0,100,100" onclick="setResult('
2')" /></map> | 79 <map name="mapname"><area shape="rect" coords="0,0,100,100" onclick="setResult('
2')" /></map> |
82 <map name="mapname"><area shape="rect" coords="0,0,100,100" onclick="setResult('
3')" /></map> | 80 <map name="mapname"><area shape="rect" coords="0,0,100,100" onclick="setResult('
3')" /></map> |
83 <img src="resources/green.jpg" border="20" width="100" height="100" usemap="mapn
ame" ismap="ismap" onclick="setResult('img')" /> | 81 <img src="resources/green.jpg" border="20" width="100" height="100" usemap="mapn
ame" ismap="ismap" onclick="setResult('img')" /> |
84 <div>This tests image map behavior when there are multiple maps with the same na
me.</div> | 82 <div>This tests image map behavior when there are multiple maps with the same na
me.</div> |
85 <pre id="log" /> | 83 <pre id="log" /> |
86 </body> | 84 </body> |
87 </html> | 85 </html> |
OLD | NEW |