Bug 1941128 - Turn off network.dns.native_https_query on Mac again
[gecko.git] / dom / svg / test / test_stroke-linecap-hit-testing.xhtml
blob7e08e88ad0cd4b1b447a16869b3c2b929b47b07d
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <!--
3 https://bugzilla.mozilla.org/show_bug.cgi?id=589648
4 -->
5 <head>
6 <title>Test hit-testing of line caps</title>
7 <script src="/tests/SimpleTest/SimpleTest.js"></script>
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
9 </head>
10 <body onload="run()">
11 <script class="testbody" type="text/javascript">
12 <![CDATA[
14 SimpleTest.waitForExplicitFinish();
16 function run() {
17 var div = document.getElementById("div");
18 var x = div.offsetLeft;
19 var y = div.offsetTop;
20 var got, expected;
22 got = document.elementFromPoint(5 + x, 5 + y);
23 expected = document.getElementById("zero-length-square-caps");
24 is(got, expected, "Check hit on zero length subpath's square caps");
26 SimpleTest.finish();
29 ]]>
30 </script>
31 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=500174">Mozilla Bug 500174</a>
32 <p id="display"></p>
33 <div id="content">
35 <div width="100%" height="1" id="div"></div>
36 <svg xmlns="http://www.w3.org/2000/svg" id="svg" width="400" height="300">
37 <path id="zero-length-square-caps" stroke="blue" stroke-width="50"
38 stroke-linecap="square" d="M25,25 L25,25"/>
39 </svg>
41 </div>
42 <pre id="test">
43 </pre>
44 </body>
45 </html>