Debian Codegraph @

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