Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / pointer-events-invalid-fill.svg
blob7053bfd5dae797ca78578f19041b2924670e7d4b
1 <svg id="svg-root" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"
2 xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()">
3 <!--======================================================================-->
4 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
5 <!--= Institute of Technology, European Research Consortium for =-->
6 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
7 <!--= All Rights Reserved. =-->
8 <!--= See http://www.w3.org/Consortium/Legal/. =-->
9 <!--======================================================================-->
10 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
11 template-version="1.4" reviewer="DAS" author="CM" status="accepted"
12 version="$Revision: 1.4 $" testname="$RCSfile: interact-pointer-03-t.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#PointerEventsProperty">
15 <p>
16 This tests that the "painted" keyword for the pointer-events property
17 does not cause pointer events to be captured when a shape's fill falls
18 back to "none" because a referenced paint server was not available.
19 </p>
20 </d:testDescription>
21 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
22 <p>
23 After loading the test, a rectangle will be displayed.
24 Move the pointer over the rectangle, and it will change color
25 to indicate whether the test was passed.
26 </p>
27 </d:operatorScript>
29 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 If the rectangle turns green once the pointing device is moved over it,
32 the test was passed. If instead it turns red (or remains black),
33 then the test failed. If the rectangle was initially red when
34 the document was loaded, then that also indicates that the test failed.
35 </p>
36 </d:passCriteria>
37 </d:SVGTestCase>
38 <title id="test-title">$RCSfile: interact-pointer-03-t.svg,v $</title>
39 <defs>
40 <font-face
41 font-family="SVGFreeSansASCII"
42 unicode-range="U+0-7F">
44 <font-face-src>
45 <font-face-uri xlink:href="../custom/resources/SVGFreeSans.svg#ascii"/>
46 </font-face-src>
47 </font-face>
48 </defs>
49 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
51 <text x='10' y='40' font-size='12'>Test pointer-events="painted" with paint server fallback</text>
53 <rect id='r1' x='10' y='80' width='50' height='50' onmouseover='report(true)'/>
54 <rect id='r2' x='10' y='80' width='50' height='50' clip-path='url(#c)' fill='url(#invalid) none' pointer-events='painted' onmouseover='report(false)'/>
56 <g id='g'>
57 <text id='t' x='10' y='150' font-size='13'>Move the pointing device over the rectangle.</text>
58 </g>
60 <script>
61 if (window.testRunner) {
62 testRunner.dumpAsText();
63 testRunner.waitUntilDone();
65 function runTest() {
66 if (window.eventSender) {
67 document.documentElement.offsetLeft;
68 eventSender.mouseMoveTo(30, 100);
71 function report(pass) {
72 var color = pass ? 'green' : 'red';
73 document.getElementById('r1').setAttribute('fill', color);
74 document.getElementById('t').firstChild.nodeValue = pass ? "You've passed!" : "You've failed.";
75 if (window.testRunner)
76 testRunner.notifyDone();
78 </script>
80 </g>
81 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
82 <text id="revision" x="10" y="340" stroke="none"
83 fill="black">$Revision: 1.4 $</text>
84 </g>
85 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
86 <!-- comment out this watermark once the test is approved --><!--
87 <g id="draft-watermark">
88 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
89 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
90 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
91 </g>-->
92 </svg>