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