Debian Codegraph @

test_non_regression/fail/na/animation/animate-interact-events-01-t.svg

raw
1 <svg id="svg-root" width="100%" height="100%"
2 viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
3 xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
6 <!--= Institute of Technology, European Research Consortium for =-->
7 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
8 <!--= All Rights Reserved. =-->
9 <!--= See http://www.w3.org/Consortium/Legal/. =-->
10 <!--======================================================================-->
11 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
12 template-version="1.4" reviewer="AE" author="ASl" status="accepted"
13 version="$Revision: 1.2 $" testname="$RCSfile: animate-interact-events-01-t.svg,v $">
14 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/interact.html#SVGEvents">
15 <p>Tests 'mouseover' event on SVGElementInstance</p>
16 <p>
17 What each case tests is as follows.
18 Case 1: mouseover event on SVGElementInstance. Referenceing an element that contains an event.
19 Case 2: mouseover event on referencing element. Event bubbling from SVGElementInstance to referencing element.
20 Case 3: mouseover event on parent of referencing element. Event bubbling from SVGElementInstance to referencing element ancestors.
21 Case 4: mousedown event on referencing element. SVGElementInstance is not effected by event listener on referencing element.
22 </p>
23 </d:testDescription>
24 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
25 <p>
26 Mouseover each of the red rectangles, and then click on the bottommost rectangle.
27 </p>
28 </d:operatorScript>
29 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
30 <p>
31 This test contains four cases. The cases must produce the following results for the test to pass.
32 </p>
33 <ul>
34 <li>Case 1: On a mouseover event on the top square, all four squares must turn blue.</li>
35 <li>Case 2: On a mouseover event on the top middle square, all four squares must turn blue and a black stroke
36 must appear on the referencing square (element).</li>
37 <li>Case 3: On a mouseover event on the bottom middle square, all four squares must turn blue and a black
38 stroke must appear on the referencing square (element).</li>
39 <li>Case 4: On a mouseover event on the bottom square, all four squares must turn blue, and on a mousedown event
40 a black stroke must appear on the referencing square (element).</li>
41 </ul>
42 </d:passCriteria>
43 </d:SVGTestCase>
44 <title id="test-title">$RCSfile: animate-interact-events-01-t.svg,v $</title>
45 <defs>
46 <font-face
47 font-family="SVGFreeSansASCII"
48 unicode-range="U+0-7F">
49 <font-face-src>
50 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
51 </font-face-src>
52 </font-face>
53 </defs>
54 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
55
56 <defs>
57 <!-- SVGElementInstance animates fill on mouseover -->
58 <rect id="rect" width="50" height="50" fill="red">
59 <set attributeName="fill" begin="mouseover" end="mouseout" to="blue"/>
60 </rect>
61 </defs>
62
63 <text x="120" y="20" font-size="15">Shadow tree event listener chain</text>
64
65 <!--basic event dispatch - all rectangles turn blue -->
66 <use fill="red" x="30" y="30" xlink:href="#rect"/>
67 <text x="95" y="45" font-size="12">Case 1: on mouseover all squares must turn blue</text>
68
69 <!-- event bubbling from SVGElementInstance to referencing element -->
70 <!-- all rectangles turn blue and second rectangle displays black stroke -->
71 <use id="use2" fill="red" x="30" y="100" xlink:href="#rect"/>
72 <rect pointer-events="none" x="30" y="100" width="50" height="50" fill="none" stroke-width="5" stroke="none" >
73 <set attributeName="stroke" begin="use2.mouseover" end="use2.mouseout" to="black"/>
74 </rect>
75 <g font-size="12">
76 <text x="95" y="115">Case 2: on mouseover all squares must turn blue</text>
77 <text x="95" y="130">and a black stroke must appear on reference square</text>
78 </g>
79
80 <!-- event bubbling from SVGElementInstance to referencing element ancestors-->
81 <!-- all rectangles turn blue and third rectangle displays black stroke -->
82 <g id="g1">
83 <use fill="red" x="30" y="170" xlink:href="#rect"/>
84 <rect pointer-events="none" x="30" y="170" width="50" height="50" fill="none" stroke-width="5" stroke="none" >
85 <set attributeName="stroke" begin="g1.mouseover" end="g1.mouseout" to="black"/>
86 </rect>
87 </g>
88 <g font-size="12">
89 <text x="95" y="185">Case 3: on mouseover all squares must turn blue</text>
90 <text x="95" y="200">and a black stroke must appear on reference square</text>
91 </g>
92
93 <!--SVGElementInstance is not effected by event listener on referencing element -->
94 <!-- all rectangles turn blue and displays black stroke only on mouse down -->
95 <use id="use3" fill="red" x="30" y="240" xlink:href="#rect"/>
96 <rect pointer-events="none" x="30" y="240" width="50" height="50" fill="none" stroke-width="5" stroke="none" >
97 <set attributeName="stroke" begin="use3.mousedown" end="use3.mouseup" to="black"/>
98 </rect>
99 <g font-size="12">
100 <text x="95" y="255">Case 4: on mouseover all squares must turn blue</text>
101 <text x="95" y="270">and on mousedown a black stroke must appear on reference square</text>
102 </g>
103
104 </g>
105 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
106 <text id="revision" x="10" y="340" stroke="none"
107 fill="black">$Revision: 1.2 $</text>
108 </g>
109 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
110 <!-- comment out this watermark once the test is approved
111 <g id="draft-watermark">
112 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
113 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
114 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
115 </g>-->
116 </svg>