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