OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body onload="runTest();"> | 6 <body onload="runTest();"> |
7 <div style="-webkit-transform: translateZ(0);"> | 7 <div style="transform: translateZ(0);"> |
8 <div id="target" style="width: 320px; height: 240px; cursor: pointer; -webki
t-tap-highlight-color: rgb(0, 255, 0)"> | 8 <div id="target" style="width: 320px; height: 240px; cursor: pointer; -webki
t-tap-highlight-color: rgb(0, 255, 0)"> |
9 <map name="map"> | 9 <map name="map"> |
10 <area shape="rect" coords="10,10,200,200" alt="Test" href="#"> | 10 <area shape="rect" coords="10,10,200,200" alt="Test" href="#"> |
11 </map> | 11 </map> |
12 <img src="resources/dice.png" usemap="#map"> | 12 <img src="resources/dice.png" usemap="#map"> |
13 </div> | 13 </div> |
14 </div> | 14 </div> |
15 <script> | 15 <script> |
16 function runTest() { | 16 function runTest() { |
17 var clientRect = document.getElementById('target').getBoundingClientRect(); | 17 var clientRect = document.getElementById('target').getBoundingClientRect(); |
18 x = (clientRect.left + clientRect.right) / 2; | 18 x = (clientRect.left + clientRect.right) / 2; |
19 y = (clientRect.top + clientRect.bottom) / 2; | 19 y = (clientRect.top + clientRect.bottom) / 2; |
20 if (window.testRunner) { | 20 if (window.testRunner) { |
21 testRunner.dumpAsTextWithPixelResults(); | 21 testRunner.dumpAsTextWithPixelResults(); |
22 testRunner.waitUntilDone(); | 22 testRunner.waitUntilDone(); |
23 } | 23 } |
24 | 24 |
25 if (window.eventSender) { | 25 if (window.eventSender) { |
26 eventSender.gestureShowPress(x, y); | 26 eventSender.gestureShowPress(x, y); |
27 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); | 27 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
28 } else { | 28 } else { |
29 debug("This test requires DumpRenderTree."); | 29 debug("This test requires DumpRenderTree."); |
30 debug("This test is successful if we don't cause a crash. TODO: Make lin
k highlight work on image maps"); | 30 debug("This test is successful if we don't cause a crash. TODO: Make lin
k highlight work on image maps"); |
31 } | 31 } |
32 } | 32 } |
33 </script> | 33 </script> |
34 </script> | 34 </script> |
35 </body> | 35 </body> |
36 </html> | 36 </html> |
OLD | NEW |