OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | |
4 <script src="../../fast/js/resources/js-test-pre.js"></script> | |
5 </head> | |
6 <body onload="runTest();"> | 3 <body onload="runTest();"> |
7 <div style="position: relative; left: 10px; top: 40px"> | 4 <div style="position: relative; left: 10px; top: 40px"> |
8 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0
.5)">Target Link.</a> | 5 <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgba(0, 255, 0, 0
.5)">Target Link.</a> |
9 </div> | 6 </div> |
10 <!-- For this test to work, must put the translateZ(0) on a div other than the o
ne containing the | 7 <!-- For this test to work, must put the translateZ(0) on a div other than the o
ne containing the |
11 highlighted link. This will force the highlight into the non-composited con
tent host, which | 8 highlighted link. This will force the highlight into the non-composited con
tent host, which |
12 may survive the navigation. --> | 9 may survive the navigation. --> |
13 <div style="position: relative; left: 10px; top: 70px; -webkit-transform: transl
ateZ(0);"> | 10 <div style="position: relative; left: 10px; top: 70px; -webkit-transform: transl
ateZ(0);"> |
14 This test is not successful if this message appears. | 11 This test is not successful if this message appears. |
15 </div> | 12 </div> |
16 <script> | 13 <script> |
17 function runTest() { | 14 function runTest() { |
18 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 15 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
19 x = (clientRect.left + clientRect.right) / 2; | 16 x = (clientRect.left + clientRect.right) / 2; |
20 y = (clientRect.top + clientRect.bottom) / 2; | 17 y = (clientRect.top + clientRect.bottom) / 2; |
21 if (window.testRunner) { | 18 if (window.testRunner) |
22 testRunner.dumpAsTextWithPixelResults(); | |
23 testRunner.waitUntilDone(); | 19 testRunner.waitUntilDone(); |
24 } | |
25 | 20 |
26 if (window.eventSender) { | 21 if (window.eventSender) { |
27 eventSender.gestureShowPress(x, y); | 22 eventSender.gestureShowPress(x, y); |
28 // Force display of highlight before navigating to second page. | 23 // Force display of highlight before navigating to second page. |
29 window.testRunner.display(); | 24 window.testRunner.display(); |
30 window.location = 'resources/gesture-tapHighlight-simple-navigate-destin
ation.html'; | 25 window.location = 'resources/gesture-tapHighlight-simple-navigate-destin
ation.html'; |
31 } else { | 26 } else { |
32 debug("This test requires DumpRenderTree."); | 27 debug("This test requires DumpRenderTree."); |
33 } | 28 } |
34 } | 29 } |
35 </script> | 30 </script> |
36 </body> | 31 </body> |
37 </html> | 32 </html> |
OLD | NEW |