Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / pointer-events-on-rounded-rect.xhtml
blob87c3de14208684c7bb702532a9acb3b430f515aa
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#roundedRect {
9 fill: none;
10 stroke: green;
11 stroke-width: 20px;
12 stroke-linejoin: bevel;
14 rect:hover {
15 stroke: red;
17 ]]></style>
18 </defs>
20 <rect id="fallback" x="30" y="30" width="420" height="320" fill="yellow" onclick="passed()"/>
21 <rect id="roundedRect" x="40" y="40" rx="30" ry="30" width="400" height="300" pointer-events="visibleStroke" onclick="failed()"/>
22 <text id="text" x="30" y="370"></text>
24 <script type="text/ecmascript">
25 <![CDATA[
27 var fallback = document.getElementById("fallback");
28 var roundedRect = document.getElementById("roundedRect");
29 var text = document.getElementById("text");
31 fallback.addEventListener("mousedown", passed, false);
32 roundedRect.addEventListener("mousedown", failed, false);
34 function stop() {
35 fallback.removeEventListener("mousedown", failed, false);
36 roundedRect.removeEventListener("mousedown", passed, false);
38 if (window.testRunner)
39 testRunner.notifyDone();
42 function failed() {
43 text.textContent = 'FAILED: strokeRect had pointer';
44 stop();
47 function passed() {
48 text.textContent = 'PASSED: fallbackRect had pointer';
49 stop();
52 if (window.testRunner) {
53 testRunner.waitUntilDone();
54 testRunner.dumpAsText();
57 if (window.eventSender) {
58 eventSender.mouseMoveTo(31, 31);
59 eventSender.mouseDown();
61 ]]>
62 </script>
64 </svg>
65 </body>
66 </html>