| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../resources/js-test.js"></script> |
| 3 <script> | 3 <script> |
| 4 var x, y; | 4 var x, y; |
| 5 | 5 |
| 6 function test() { | 6 function test() { |
| 7 var innerBox = document.getElementById('roundedBox'); | 7 var innerBox = document.getElementById('roundedBox'); |
| 8 var rect = innerBox.getBoundingClientRect(); | 8 var rect = innerBox.getBoundingClientRect(); |
| 9 x = rect.left; | 9 x = rect.left; |
| 10 y = rect.top; | 10 y = rect.top; |
| 11 // At top-left corner. | 11 // At top-left corner. |
| 12 shouldBe("document.elementFromPoint(x + 5, y + 5).id", "'container'"); | 12 shouldBe("document.elementFromPoint(x + 5, y + 5).id", "'container'"); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 33 background-color: lightgreen; | 33 background-color: lightgreen; |
| 34 } | 34 } |
| 35 </style> | 35 </style> |
| 36 <body onload="test()"> | 36 <body onload="test()"> |
| 37 <p>This test checks that div block should not get events on clicking outside
the rounded border but within the bounding box of the block.</p> | 37 <p>This test checks that div block should not get events on clicking outside
the rounded border but within the bounding box of the block.</p> |
| 38 <div id="container"> | 38 <div id="container"> |
| 39 <div id="roundedBox"></div> | 39 <div id="roundedBox"></div> |
| 40 </div> | 40 </div> |
| 41 <div id="console"></div> | 41 <div id="console"></div> |
| 42 </body> | 42 </body> |
| OLD | NEW |