Debian Codegraph @

test_non_regression/fail/na/animation/animate-elem-65-t.svg

raw
1 <svg version="1.1" baseProfile="tiny" id="svg-root"
2 width="100%" height="100%" viewBox="0 0 480 360"
3 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4 <!--======================================================================-->
5 <!--= SVG 1.1 2nd Edition Test Case =-->
6 <!--======================================================================-->
7 <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
8 <!--= Institute of Technology, European Research Consortium for =-->
9 <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
10 <!--= All Rights Reserved. =-->
11 <!--= See http://www.w3.org/Consortium/Legal/. =-->
12 <!--======================================================================-->
13 <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
14 template-version="1.4" reviewer="CN" author="VH" status="accepted"
15 version="$Revision: 1.6 $" testname="$RCSfile: animate-elem-65-t.svg,v $">
16 <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/animate.html#Animation">
17 <p>
18 This tests performs basic tests on the min attribute. The test is based
19 on the SMIL specification at:
20 http://www.w3.org/TR/smil20/smil-timing.html#Timing-MinMax.
21 </p>
22 <p>
23 Each row in the test shows different rectangles subject to &lt;set&gt;
24 animations with different configurations with regards to the min
25 attribute. For each row but the last one, the animation should be active
26 during the first 5 seconds of the animations where the red rectangle
27 should show in the right column. At five seconds into the animation,
28 all the rectangles should move to their left position.
29 </p>
30 <p>
31 On the first row, the first &lt;set&gt; animation (left rectangle) has an end value of 5s,
32 and no min attribute. The active duration resulting from the end attribute is 5s.
33 The first row shows a second rectangle with a &lt;set&gt; animation with
34 the same configuration except that the min attribute value is set to
35 'media'. Because the &lt;set&gt; element does not define a media, the
36 behavior should be as if the attribute was not specified. The active duration (5s)
37 of the second &lt;set&gt; animation is therefore not constrained.
38 </p>
39 <p>
40 On the second row, the &lt;set&gt; animation has an end value of 5s,
41 and a -6s min attribute. The active duration resulting from the end attribute is 5s.
42 The negative min value is invalid and, as per the specification, the behavior should be
43 as if the attribute was not specified. The active duration (5s) is therefore not constrained.
44 </p>
45 <p>
46 On the third row, the &lt;set&gt; animation has an end value of 5s,
47 and a 3s min attribute. The active duration resulting from the end attribute is 5s.
48 The min value is less than the active duration, so the min attribute does not actually
49 constrain the active duration.
50 </p>
51 <p>
52 On the fourth row, the &lt;set&gt; animation has a dur value of indefinite, an end value of 2s,
53 and a 5s min attribute. The active duration resulting from the end attribute would be 2s.
54 Because this is less than the min value (2s &lt; 5s) the (min constrained) active duration
55 has to be corrected to 5s, despite a simple duration (indefinite) that is greater than the min value.
56 </p>
57 <p>
58 On the fifth row, the &lt;set&gt; animation has a dur value of 1s, an end value of 2s,
59 a repeatCount of 7 and a 5s min attribute. The active duration resulting from dur, end and repeatCount
60 would be 2s. Because this is less than the min value (2s &lt; 5s)
61 the (min constrained) active duration has to be corrected to 5s.
62 </p>
63 <p>
64 On the sixth row, the &lt;set&gt; animation has a dur value of 1s, an end
65 value of 2s, a repeatCount of 5 and a 8s min attribute value.
66 The active duration resulting from dur, end and repeatCount
67 would be 2s, because this is less than the min value (2s &lt; 8s)
68 the active duration has to be corrected to 8s. As the
69 fill attribute is set to 'remove' on the &lt;set&gt; animation, this
70 remove is applied at 5s, the end of the repeatCount.
71 Note, that if the end of active duration would have been used as a
72 syncbase-value for another animation, the corrected end event at
73 (begin + min) = 8s has to be used.
74 </p>
75 <p>
76 On the seventh row, the &lt;set&gt; animation has a dur value of 1s, an end
77 value of 2s, a repeatCount of 5 and a 8s min attribute value.
78 The active duration resulting from dur, end and repeatCount
79 would be 2s, because this is less than the min value (2s &lt; 8s)
80 the active duration has to be corrected to 8s. As the fill attribute
81 is set to 'freeze' on the &lt;set&gt; animation, the animation is frozen at
82 5s, the end of the repeatCount, the &lt;set&gt; applies indefinitely.
83 Note, that if the end of active duration would have been used as a
84 syncbase-value for another animation, the corrected end event at
85 (begin + min) = 8s has to be used.
86 </p>
87 </d:testDescription>
88 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
89 <p>Run the test and observe it for at least six seconds. No interaction required.</p>
90 </d:operatorScript>
91 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
92 <p>The test passes if the following conditions are met:</p>
93 <ul>
94 <li>For the first five seconds after the document loads,
95 all of the red squares in the top six rows are in the right column, and
96 after five seconds, they all move to the left column.</li>
97 <li>The red square in the last row is always in the right column.</li>
98 </ul>
99 </d:passCriteria>
100 </d:SVGTestCase>
101 <title id="test-title">$RCSfile: animate-elem-65-t.svg,v $</title>
102 <defs>
103 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
104 <font-face-src>
105 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
106 </font-face-src>
107 </font-face>
108 </defs>
109 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
110 <text text-anchor="middle" x="240" y="30" font-size="20">min</text>
111
112 <g transform="translate(100, 50)">
113
114 <g transform="translate(120,45)" text-anchor="end" font-size="14">
115 <text>no min / media</text>
116 <text y="25">invalid min</text>
117 <text y="50">min &lt; active dur</text>
118 <text y="75">min &gt; active dur</text>
119 <text y="100">min &lt; repeat dur</text>
120 <text y="125">min &gt; repeat dur, remove</text>
121 <text y="180">min &gt; repeat dur, freeze</text>
122 </g>
123
124 <g id="timeMarkersText" transform="translate(150, 25)" text-anchor="middle" font-size="14">
125 <text>&gt; 5s</text>
126 <text x="80">0s-5s</text>
127
128 <g transform="translate(0, 180)">
129 <text>never</text>
130 <text x="80">&gt; 0s</text>
131 </g>
132 </g>
133
134 <g transform="translate(150,40)" stroke="black">
135 <defs>
136 <rect id="shadow" x="-6" y="-6" width="12" height="12" fill="#ccc" stroke="black" stroke-width="1"/>
137 </defs>
138
139 <g id="setOne">
140 <use xlink:href="#shadow" x="0"/>
141 <use xlink:href="#shadow" x="80"/>
142
143 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
144 <set id="firstSet" attributeName="x" to="74" end="5s"/>
145 </rect>
146
147 <g transform="translate(20, 0)">
148 <use xlink:href="#shadow" x="0"/>
149 <use xlink:href="#shadow" x="80"/>
150
151 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
152 <set attributeName="x" to="74" end="5s" min="media"/>
153 </rect>
154 </g>
155 </g>
156
157 <g id="setTwo" transform="translate(0, 25)">
158 <use xlink:href="#shadow" x="0"/>
159 <use xlink:href="#shadow" x="80"/>
160
161 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
162 <set attributeName="x" to="74" min="-6s" end="5s"/>
163 </rect>
164 </g>
165
166 <g id="setThree" transform="translate(0, 50)">
167 <use xlink:href="#shadow" x="0"/>
168 <use xlink:href="#shadow" x="80"/>
169
170 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
171 <set attributeName="x" to="74" min="3s" end="5s"/>
172 </rect>
173 </g>
174
175 <g id="setFour" transform="translate(0, 75)">
176 <use xlink:href="#shadow" x="0"/>
177 <use xlink:href="#shadow" x="80"/>
178
179 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
180 <set attributeName="x" to="74" min="5s" dur="indefinite" end="2s"/>
181 </rect>
182 </g>
183
184 <g id="setFive" transform="translate(0, 100)">
185 <use xlink:href="#shadow" x="0"/>
186 <use xlink:href="#shadow" x="80"/>
187
188 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
189 <set attributeName="x" to="74" min="5s" end="2s" dur="1s" repeatCount="7"/>
190 </rect>
191 </g>
192
193 <g id="setSix" transform="translate(0, 125)">
194 <use xlink:href="#shadow" x="0"/>
195 <use xlink:href="#shadow" x="80"/>
196
197 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
198 <set attributeName="x" to="74" min="8s" end="2s" dur="1s" repeatCount="5" fill="remove"/>
199 </rect>
200 </g>
201
202 <g id="setSeven" transform="translate(0, 180)">
203 <use xlink:href="#shadow" x="0"/>
204 <use xlink:href="#shadow" x="80"/>
205
206 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
207 <set attributeName="x" to="74" min="8s" end="2s" dur="1s" repeatCount="5" fill="freeze"/>
208 </rect>
209 </g>
210 </g>
211 </g>
212 </g>
213 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
214 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
215 </g>
216 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
217 <!-- comment out this watermark once the test is approved -->
218 <!--<g id="draft-watermark">
219 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
220 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
221 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
222 </g>-->
223 </svg>