2 <script src=
"../../resources/js-test.js"></script>
7 var innerBox
= document
.getElementById('roundedBox');
8 var rect
= innerBox
.getBoundingClientRect();
11 // At top-left corner.
12 shouldBe("document.elementFromPoint(x + 5, y + 5).id", "'container'");
13 // At top-right corner.
14 shouldBe("document.elementFromPoint(x + 195, y + 5).id", "'container'");
15 // At bottom-left corner.
16 shouldBe("document.elementFromPoint(x + 5, y + 195).id", "'container'");
17 // At bottom-right corner.
18 shouldBe("document.elementFromPoint(x + 195, y + 195).id", "'container'");
20 shouldBe("document.elementFromPoint(x + 100, y + 100).id", "'roundedBox'");
27 background-color: lightgray;
33 background-color: lightgreen;
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>
39 <div id=
"roundedBox"></div>
41 <div id=
"console"></div>