Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css" > | |
| 6 </head> | |
| 7 <body onload="runTest();"> | |
| 8 <div id="highlight" class="fauxHighlight" style="z-index: 1; position: absolut e"></div> | |
| 9 <style> | |
|
Rick Byers
2014/07/30 15:35:51
again, move to inside the <head> tag.
mustaq
2014/07/30 16:40:44
Done.
| |
| 10 #outerDiv { | |
| 11 width: 150px; | |
| 12 } | |
| 13 #outerDiv, #outerDiv div { | |
| 14 padding: 15px; | |
| 15 border-style: solid; | |
| 16 } | |
| 17 </style> | |
| 18 <div class="opaqueHighlight" id="outerDiv" style="cursor: pointer"> | |
| 19 <div> | |
| 20 <div style="cursor: pointer"> | |
| 21 <div id="innerDiv"></div> | |
| 22 </div> | |
| 23 </div> | |
| 24 </div> | |
| 25 | |
| 26 This test is successful if the outermost box above is covered with a green rec tangle. | |
| 27 | |
| 28 <script> | |
| 29 function runTest() { | |
| 30 var clientRect = document.getElementById("outerDiv").getBoundingClientRect (); | |
| 31 var highlight = document.getElementById("highlight"); | |
| 32 | |
| 33 highlight.style.left = clientRect.left + "px"; | |
| 34 highlight.style.top = clientRect.top + "px"; | |
| 35 highlight.style.width = clientRect.width + "px"; | |
| 36 highlight.style.height = clientRect.height + "px"; | |
| 37 | |
| 38 if (window.testRunner) | |
| 39 testRunner.dumpAsTextWithPixelResults(); | |
| 40 } | |
| 41 </script> | |
| 42 </body> | |
| 43 </html> | |
| OLD | NEW |