Debian Codegraph @

test_non_regression/fail/na/animation/animate-elem-62-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-62-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 test performs basic test on the end attribute,
19 assuming support for the &lt;set&gt; element and setting the
20 fill attribute on a &lt;rect&gt; element.
21 </p>
22 <p>
23 The test validates the various possibilities for the end attribute
24 value: no specified value, offset value, event base value, sync base
25 value, indefinite value, repeat value, accessKey value and wallclock.
26 </p>
27 <p>
28 There are one or several &lt;set&gt; elements for each of the possible end
29 values. For each test, the &lt;set&gt; element(s) has (or have) an indefinite
30 duration and no other timing attribute specified other than end
31 and dur.
32 </p>
33 <p>
34 There are two sets of vertical markers which help check that the test
35 is handled properly by the user agent. The first set, on the left, shows
36 markers from 0s to 8s, where the times are offset from the document's load time.
37 The rectangles in that area should turn green at the time corresponding
38 to the column they are in. From example, the first rectangle (going left to right)
39 on the "sync base" line should turn green 2 seconds after the document's load.
40 The second set of time vertical markers shows offset from a particular event.
41 For example, for the event base, the markers show an offset to the time
42 the first event base rectangle (the left-most one) is clicked on. For the
43 accessKey line, the times show offsets from the time the 'a' key is pressed
44 and the document has focus.
45 </p>
46 <p>
47 The first &lt;set&gt; has no end attribute and an indefinite duration.
48 Since there are no constraints on the active duration (no end attribute) the
49 active duration is the same as the simple duration (indefinite). This
50 means that the animation begins at 0s and has an indefinite end time.
51 </p>
52 <p>
53 The second &lt;set&gt; has its end attribute set to '2s'. So its
54 target rectangle should turn green two seconds after the document is
55 loaded.
56 </p>
57 <p>
58 The third &lt;set&gt; has its end attribute set to an event base
59 value 'click'. The user has to click on the left-most target red rectangle
60 to make the &lt;set&gt; target turn green. There are two rectangles
61 with associated &lt;set&gt; elements. The left most ones has a simple
62 value (no offset) and the second one is offset from the event time by 2 seconds.
63 </p>
64 <p>
65 The fourth &lt;set&gt; elements have their end attributes set to a sync base
66 value. The first two rectangles have &lt;set&gt; elements synchronized on their sync base
67 end. The left-most one has no offset and the following one has a 2 seconds offset.
68 The last two rectangles have &lt;set&gt; elements synchronized on their sync base end.
69 The first one (i.e., the third from left to right on that line), has a 2 seconds
70 negative offset. The second one (i.e., the last one on the line) has no offset and should
71 end at the time its sync base ends.
72 </p>
73 <p>
74 The fifth &lt;set&gt; has its end attribute set to indefinite and
75 should not turn red and stay green.
76 </p>
77 <p>
78 The sixth &lt;set&gt;s have their end attributes have their end attributes
79 based on the repeat() function. The repeat they are synchronized on happens
80 at 3s. The first &lt;set&gt;, which has no offset, should end at 3s. The
81 second &lt;set&gt;, which has a 2 seconds offset, should start at 5s.
82 </p>
83 <p>
84 The seventh &lt;set&gt;s have their end attributes set to 'accessKey(a)'.
85 The first one has no offset and should become active (and turn the rectangle
86 green), as soon as the key 'a' is pressed in the user agent. The second &lt;set&gt;
87 has a 2s offset and should become active 2 seconds after the 'a' key is pressed in
88 the user agent.
89 </p>
90 <p>
91 The eight's &lt;set&gt; target has its end attribute set to
92 'wallclock()'. The result depends on the presentation time.
93 If the document is viewed completely before 2200-06-10T12:34:56Z,
94 the rectangle has to be always green. begin is not explicitely set, therefore
95 it is zero, dur is indefinite and end is in the future.
96 If the document is viewed completely after 2200-06-10T12:34:56Z, the only end
97 value is before the implicitely given only begin value and therefore the set
98 does not start, the rectangle remains red. If the document is viewed in a time interval started before
99 2200-06-10T12:34:56Z and ended after this date, the rectangle will start green at the beginning, change to red at
100 2200-06-10T12:34:56Z and will remain red until the end of presentation.
101 </p>
102 </d:testDescription>
103 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
104 <p>Run the test. Observe the document for at least eight seconds.
105 Then, click on the first red square in the "event base" row,
106 and observe the document for two seconds. Then, press "a"
107 on the keyboard, and observe the document for another two seconds.</p>
108 </d:operatorScript>
109 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
110 <p>The test passes if the following conditions are met:</p>
111 <ul>
112 <li>In the first eight seconds of the document, the 10 squares
113 in the left section of the test must become green at the time
114 at the top of the column they are in. For example, the square in
115 the "offset" row must become green at 2s after the document has
116 been loaded.</li>
117 <li>Immediately once the red square in the "event base" row has been clicked,
118 it must become green. Two seconds after the click, the second square
119 must become green.</li>
120 <li>Immediately once "a" has been pressed on the keyboard,
121 the first square in the "accessKey()" row must become green.
122 Two seconds after the keypress, the second square must become green.</li>
123 <li>No other changes occur in the document.</li>
124 </ul>
125 </d:passCriteria>
126 </d:SVGTestCase>
127 <title id="test-title">$RCSfile: animate-elem-62-t.svg,v $</title>
128 <defs>
129 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
130 <font-face-src>
131 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
132 </font-face-src>
133 </font-face>
134 </defs>
135 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
136 <text text-anchor="middle" x="240" y="30" font-size="20">end</text>
137 <g transform="translate(100, 80)">
138 <g transform="translate(80,5)" text-anchor="end" font-size="14">
139 <text>unspecified</text>
140 <text y="25">offset</text>
141 <text y="50">event base</text>
142 <text y="75">sync base</text>
143 <text y="100">indefinite</text>
144 <text y="125">repeat()</text>
145 <text y="150">accessKey()</text>
146 <text y="175">wallclock()</text>
147 </g>
148
149 <g id="timeMarkersText" transform="translate(100, -15)" text-anchor="middle" font-size="8">
150 <text>0s</text>
151 <text x="12">1s</text>
152 <text x="24">2s</text>
153 <text x="36">3s</text>
154 <text x="48">4s</text>
155 <text x="60">5s</text>
156 <text x="72">6s</text>
157 <text x="84">7s</text>
158 <text x="96">8s</text>
159 <text x="120">0s</text>
160 <text x="132">1s</text>
161 <text x="144">2s</text>
162 </g>
163
164 <g id="timeMarkers" transform="translate(94, -10) scale(1, 8)">
165 <rect width="12" height="25" fill="#eee"/>
166 <rect x="12" width="12" height="25" fill="#ddd"/>
167 <rect x="24" width="12" height="25" fill="#eee"/>
168 <rect x="36" width="12" height="25" fill="#ddd"/>
169 <rect x="48" width="12" height="25" fill="#eee"/>
170 <rect x="60" width="12" height="25" fill="#ddd"/>
171 <rect x="72" width="12" height="25" fill="#eee"/>
172 <rect x="84" width="12" height="25" fill="#ddd"/>
173 <rect x="96" width="12" height="25" fill="#eee"/>
174 <rect x="120" width="12" height="25" fill="#eee"/>
175 <rect x="132" width="12" height="25" fill="#ddd"/>
176 <rect x="144" width="12" height="25" fill="#eee"/>
177 </g>
178
179 <g transform="translate(100,0)">
180 <g id="setOne">
181 <rect x="-6" y="-6" width="12" height="12" fill="#F33">
182 <set attributeName="fill" to="#3F3" begin="0s" dur="indefinite"/>
183 </rect>
184 </g>
185
186 <g id="setTwo" transform="translate(0, 25)">
187 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(24,0)">
188 <set id="secondSet" attributeName="fill" to="#F33" begin="0s" end="2s" dur="indefinite"/>
189 </rect>
190 </g>
191
192 <g id="setThree" transform="translate(0, 50)">
193 <rect id="setThreeTarget" x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(120,0)">
194 <set attributeName="fill" id="thirdSet" to="#F33" end="setThreeTarget.click" dur="indefinite"/>
195 </rect>
196 <rect x="-6" y="-6" width="12" height="12" fill="#F33" transform="translate(144,0)">
197 <set attributeName="fill" id="thirdSetOffset" to="#3F3" begin="setThreeTarget.click + 2s" dur="indefinite"/>
198 </rect>
199 </g>
200
201 <g id="setFour" transform="translate(0, 75)">
202 <set id="endBase" attributeName="display" to="inline" begin="7s" dur="1s"/>
203 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(24,0)">
204 <set attributeName="fill" to="#F33" end="secondSet.begin + 2s" dur="indefinite"/>
205 </rect>
206 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(48,0)">
207 <set attributeName="fill" to="#F33" end="secondSet.begin + 4s" dur="indefinite"/>
208 </rect>
209 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(72,0)">
210 <set attributeName="fill" to="#F33" end="endBase.end - 2s" dur="indefinite"/>
211 </rect>
212 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(96,0)">
213 <set attributeName="fill" to="#F33" end="endBase.end" dur="indefinite"/>
214 </rect>
215 </g>
216
217 <g id="setFive" transform="translate(0, 100)">
218 <rect x="-6" y="-6" width="12" height="12" fill="#F33">
219 <set attributeName="fill" to="#3F3" end="indefinite" dur="indefinite"/>
220 </rect>
221 </g>
222
223 <g id="setSix" transform="translate(0, 125)">
224 <set id="repeatingSet" attributeName="display" to="inline" begin="0s" dur="1s" repeatCount="4"/>
225 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(36,0)">
226 <set attributeName="fill" to="#F33" end="repeatingSet.repeat(3)" dur="indefinite"/>
227 </rect>
228 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(60,0)">
229 <set attributeName="fill" to="#F33" end="repeatingSet.repeat(3) + 2s" dur="indefinite"/>
230 </rect>
231 </g>
232
233 <g id="setSeven" transform="translate(0, 150)">
234 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(120,0)">
235 <set attributeName="fill" to="#F33" end="accessKey(a)" dur="indefinite"/>
236 </rect>
237 <rect x="-6" y="-6" width="12" height="12" fill="#3F3" transform="translate(144,0)">
238 <set attributeName="fill" to="#F33" end="accessKey(a) + 2s" dur="indefinite"/>
239 </rect>
240 </g>
241
242 <g id="setEight" transform="translate(0, 175)">
243 <rect x="-6" y="-6" width="12" height="12" fill="#F33">
244 <set attributeName="fill" to="#3F3" end="wallclock(2200-06-10T12:34:56Z)" dur="indefinite"/>
245 </rect>
246 </g>
247 </g>
248 </g>
249 </g>
250 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
251 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
252 </g>
253 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
254 <!-- comment out this watermark once the test is approved -->
255 <!--<g id="draft-watermark">
256 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
257 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
258 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
259 </g>-->
260 </svg>