Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / pointer-events-with-linecaps-and-miterlimits.xhtml
blobd1cb38fb8ca53e90b641095a04869d5a3f96fc9a
1 <html xmlns='http://www.w3.org/1999/xhtml'>
2 <body style="margin: 0px; padding: 0px">
4 <svg xmlns="http://www.w3.org/2000/svg" style="position:absolute;">
5 <defs>
7 <style type="text/css"><![CDATA[
8 rect#strokedRect {
9 fill: none;
10 stroke: blue;
11 stroke-width: 20px;
12 stroke-linecap: square;
13 stroke-miterlimit: 1;
15 rect#strokedRect:hover {
16 stroke: red;
18 ]]></style>
19 </defs>
21 <rect id="fallback" x="0" y="0" width="210" height="210" fill="green" onclick="passed()"/>
22 <rect id="strokedRect" x="10" y="10" width="190" height="190" pointer-events="visibleStroke" onclick="failed()"/>
23 <text id="text" x="0" y="230"></text>
25 <script type="text/ecmascript">
26 <![CDATA[
28 var fallback = document.getElementById("fallback");
29 var strokedRect = document.getElementById("strokedRect");
30 var text = document.getElementById("text");
32 fallback.addEventListener("mousedown", passed, false);
33 strokedRect.addEventListener("mousedown", failed, false);
35 function stop() {
36 fallback.removeEventListener("mousedown", failed, false);
37 strokedRect.removeEventListener("mousedown", passed, false);
39 if (window.testRunner)
40 testRunner.notifyDone();
43 function failed() {
44 text.textContent = 'FAILED: strokeRect had pointer';
45 stop();
48 function passed() {
49 text.textContent = 'PASSED: fallbackRect had pointer';
50 stop();
53 if (window.testRunner) {
54 testRunner.waitUntilDone();
55 testRunner.dumpAsText();
58 if (window.eventSender) {
59 eventSender.mouseMoveTo(1, 1);
60 eventSender.mouseDown();
63 ]]>
64 </script>
65 </svg>
67 </body>
68 </html>