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); position: relative;"> | 7 <div style="transform: translateZ(0); position: relative;"> |
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 <div id="target" style="width: 320px; height: 240px; "></div> | 9 <div id="target" style="width: 320px; height: 240px; "></div> |
10 </div> | 10 </div> |
11 </div> | 11 </div> |
12 <script> | 12 <script> |
13 function runTest() { | 13 function runTest() { |
14 var clientRect = document.getElementById('target').getBoundingClientRect(); | 14 var clientRect = document.getElementById('target').getBoundingClientRect(); |
15 x = (clientRect.left + clientRect.right) / 2; | 15 x = (clientRect.left + clientRect.right) / 2; |
16 y = (clientRect.top + clientRect.bottom) / 2; | 16 y = (clientRect.top + clientRect.bottom) / 2; |
17 if (window.testRunner) { | 17 if (window.testRunner) { |
18 testRunner.dumpAsTextWithPixelResults(); | 18 testRunner.dumpAsTextWithPixelResults(); |
19 testRunner.waitUntilDone(); | 19 testRunner.waitUntilDone(); |
20 } | 20 } |
21 | 21 |
22 if (window.eventSender) { | 22 if (window.eventSender) { |
23 eventSender.gestureShowPress(x, y); | 23 eventSender.gestureShowPress(x, y); |
24 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); | 24 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
25 } else { | 25 } else { |
26 debug("This test requires DumpRenderTree."); | 26 debug("This test requires DumpRenderTree."); |
27 debug("This test is successful if we don't cause a crash. TODO: Make lin
k highlight work on image maps"); | 27 debug("This test is successful if we don't cause a crash. TODO: Make lin
k highlight work on image maps"); |
28 } | 28 } |
29 } | 29 } |
30 </script> | 30 </script> |
31 </script> | 31 </script> |
32 </body> | 32 </body> |
33 </html> | 33 </html> |
OLD | NEW |