| 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 <script src="resources/target-div-run-test.js"></script> | 5 <script src="resources/target-div-run-test.js"></script> |
| 6 <script src="resources/link-highlight-helper.js"></script> | 6 <script src="resources/link-highlight-helper.js"></script> |
| 7 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"
> | 7 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"
> |
| 8 </head> | 8 </head> |
| 9 <body onload="runTest();"> | 9 <body onload="runTest();"> |
| 10 <div style="position: absolute; top: 10px; left: 10px; -webkit-transform: transl
ateZ(0);"> | 10 <div style="position: absolute; top: 10px; left: 10px; transform: translateZ(0);
"> |
| 11 <div style="position: relative; top: 10px; left: 25px;"> | 11 <div style="position: relative; top: 10px; left: 25px;"> |
| 12 <div class="opaqueHighlight" id="targetDiv" style="position: fixed; left: 50px;
top: 50px; width: 50px; height: 50px; box-shadow: 0px 4px 23px 5px rgba(0, 0, 0,
0.2); border-style: solid; border-width: 2px; cursor: Pointer"> | 12 <div class="opaqueHighlight" id="targetDiv" style="position: fixed; left: 50px;
top: 50px; width: 50px; height: 50px; box-shadow: 0px 4px 23px 5px rgba(0, 0, 0,
0.2); border-style: solid; border-width: 2px; cursor: Pointer"> |
| 13 <br><center>Target</center><br> | 13 <br><center>Target</center><br> |
| 14 </div> | 14 </div> |
| 15 </div> | 15 </div> |
| 16 </div> | 16 </div> |
| 17 <div style="position: absolute; left: 10px; top: 250px; -webkit-transform: trans
lateZ(0);"> | 17 <div style="position: absolute; left: 10px; top: 250px; transform: translateZ(0)
;"> |
| 18 This test is successful if the box labelled "Target" has a green rectangle cente
red on it. | 18 This test is successful if the box labelled "Target" has a green rectangle cente
red on it. |
| 19 </div> | 19 </div> |
| 20 <script> | 20 <script> |
| 21 function runTest() { | 21 function runTest() { |
| 22 useMockHighlight(); | 22 useMockHighlight(); |
| 23 | 23 |
| 24 var clientRect = document.getElementById('targetDiv').getBoundingClientRect(
); | 24 var clientRect = document.getElementById('targetDiv').getBoundingClientRect(
); |
| 25 x = (clientRect.left + clientRect.right) / 2; | 25 x = (clientRect.left + clientRect.right) / 2; |
| 26 y = (clientRect.top + clientRect.bottom) / 2; | 26 y = (clientRect.top + clientRect.bottom) / 2; |
| 27 if (window.testRunner) { | 27 if (window.testRunner) { |
| 28 testRunner.dumpAsTextWithPixelResults(); | 28 testRunner.dumpAsTextWithPixelResults(); |
| 29 testRunner.waitUntilDone(); | 29 testRunner.waitUntilDone(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 if (window.eventSender) { | 32 if (window.eventSender) { |
| 33 eventSender.gestureShowPress(x, y); | 33 eventSender.gestureShowPress(x, y); |
| 34 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); | 34 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 35 } else { | 35 } else { |
| 36 debug("This test requires DumpRenderTree."); | 36 debug("This test requires DumpRenderTree."); |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 </script> | 39 </script> |
| 40 </script> | 40 </script> |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |