OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body onload="runTest();"> | 3 <body onload="runTest();"> |
4 <div style="position: relative; left: 10px; top: 40px"> | 4 <div style="position: relative; left: 10px; top: 40px"> |
5 <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> |
6 </div> | 6 </div> |
7 <!-- 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 |
8 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 |
9 may survive the navigation. --> | 9 may survive the navigation. --> |
10 <div style="position: relative; left: 10px; top: 70px; -webkit-transform: transl
ateZ(0);"> | 10 <div style="position: relative; left: 10px; top: 70px; transform: translateZ(0);
"> |
11 This test is not successful if this message appears. | 11 This test is not successful if this message appears. |
12 </div> | 12 </div> |
13 <script src="../../resources/run-after-display.js"></script> | 13 <script src="../../resources/run-after-display.js"></script> |
14 <script> | 14 <script> |
15 function runTest() { | 15 function runTest() { |
16 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 16 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
17 x = (clientRect.left + clientRect.right) / 2; | 17 x = (clientRect.left + clientRect.right) / 2; |
18 y = (clientRect.top + clientRect.bottom) / 2; | 18 y = (clientRect.top + clientRect.bottom) / 2; |
19 if (window.testRunner) | 19 if (window.testRunner) |
20 testRunner.waitUntilDone(); | 20 testRunner.waitUntilDone(); |
21 | 21 |
22 if (window.eventSender) { | 22 if (window.eventSender) { |
23 eventSender.gestureShowPress(x, y); | 23 eventSender.gestureShowPress(x, y); |
24 // Force display of highlight before navigating to second page. | 24 // Force display of highlight before navigating to second page. |
25 runAfterDisplay(function() { | 25 runAfterDisplay(function() { |
26 window.location = 'resources/gesture-tapHighlight-simple-navigate-de
stination.html'; | 26 window.location = 'resources/gesture-tapHighlight-simple-navigate-de
stination.html'; |
27 runAfterDisplay(function() { | 27 runAfterDisplay(function() { |
28 testRunner.notifyDone(); | 28 testRunner.notifyDone(); |
29 }); | 29 }); |
30 }); | 30 }); |
31 } else { | 31 } else { |
32 debug("This test requires DumpRenderTree."); | 32 debug("This test requires DumpRenderTree."); |
33 } | 33 } |
34 } | 34 } |
35 </script> | 35 </script> |
36 </body> | 36 </body> |
37 </html> | 37 </html> |
OLD | NEW |