Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / W3C-SVG-1.1 / animate-elem-66-t.svg
blob049781ea627abaf405f5425a1743b4895227e278
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--======================================================================-->
3 <!--= Copyright 2004 World Wide Web Consortium, (Massachusetts =-->
4 <!--= Institute of Technology, Institut National de Recherche en =-->
5 <!--= Informatique et en Automatique, Keio University). All Rights =-->
6 <!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
7 <!--======================================================================--><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
9 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
10 <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewer="CN" owner="VH" desc="Basic test on the max attribute and combinations of the min and max attributes" status="accepted" version="$Revision: 1.7 $" testname="$RCSfile: animate-elem-66-t.svg,v $">
11 <OperatorScript>
12 <Paragraph>
13 This tests performs basic tests on the max attribute and on
14 combinations of the min and max attributes. The test is based
15 on the SMIL specification at:
16 http://www.w3.org/TR/smil20/smil-timing.html#Timing-MinMax.
17 </Paragraph>
18 <Paragraph>
19 Each row in the test shows different rectangles subject to &lt;set&gt;
20 animations with different configurations with regards to the max and min
21 attributes. For each row, the animation should be active
22 during the first 5 seconds of the animations where the red rectangle
23 should show in the right column. At five seconds into the animation,
24 all the rectangles should move to their left position.
25 </Paragraph>
26 <Paragraph>
27 On the first row, the &lt;set&gt; animation has a (0s &lt;= t &lt; 5s) active duration
28 and no max attribute so the actual active duration is (0s &lt;= t &lt; 5s).
29 The first row shows a second rectangle with a &lt;set&gt; animation with
30 the same configuration except that the max attribute value is set to
31 'media'. Because the &lt;set&gt; element does not define a media, the
32 behavior should be as if the attribute was not specified.
33 </Paragraph>
34 <Paragraph>
35 On the second row, the &lt;set&gt; animation has a (0s &lt;= t &lt; 5s) active duration
36 and a min attribute set to '-6s' for the first rectangle and to 'foo' for the
37 second one. These values are invalid for max and, as
38 per the specification, the behavior should be as if the attribute was not
39 specified. Consequently, the behavior is as for the previous row and
40 the actual active duration is (0s &lt;= t &lt; 5s).
41 </Paragraph>
42 <Paragraph>
43 On the third row, the &lt;set&gt; animation has a (0s &lt;= t &lt; 8s) initial active duration
44 and a max attribute set to '5s'. The max value is less than the active
45 duration, so the max attribute constrains the active duration to (0s &lt;= t &lt; 5s).
46 </Paragraph>
47 <Paragraph>
48 On the fourth row, the &lt;set&gt; animation has a (0s &lt;= t &lt; 5s) initial active duration,
49 an indefinite simple duration (dur is set to indefinite) and a max attribute set to '8s'.
50 Because the initial active duration is less than the max attribute the active
51 duration is not constrained and is unchanged at (0s &lt;= t &lt; 5s).
52 </Paragraph>
53 <Paragraph>
54 On the fifth row, the &lt;set&gt; animation has a (0s &lt;= t &lt; indefinite) initial active duration,
55 a min of 2s and a max of 5s. Because the min value is less than the max value, both apply
56 and the computed active duration is (0s &lt;= t &lt; 5s).
57 </Paragraph>
58 <Paragraph>
59 On the sixth row, the &lt;set&gt; animation has a (0s &lt;= t &lt; indefinite) initial active duration,
60 a min of 5s and a max of 5s. Because the min value is equal to the max value, both apply
61 and the computed active duration is (0s &lt;= t &lt; 5s).
62 </Paragraph>
63 <Paragraph>
64 On the seventh row, the &lt;set&gt; animation has a (0s &lt;= t &lt; 5s) initial active duration,
65 a min of 2s and a max of 8s. Because the min value is greater than the max value, both are
66 ignored and the computed active duration is (0s &lt;= t &lt; 5s).
67 </Paragraph>
68 </OperatorScript>
69 </SVGTestCase>
70 <title id="test-title">$RCSfile: animate-elem-66-t.svg,v $</title>
72 <!--======================================================================-->
73 <!--Content of Test Case follows... =====================-->
74 <!--======================================================================-->
75 <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.7 $</text>
76 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
78 <text text-anchor="middle" x="240" y="30" font-size="20">max</text>
80 <text text-anchor="middle" x="240" y="190" font-size="20">min &amp; max</text>
82 <g transform="translate(100, 30)">
84 <g transform="translate(120,45)" text-anchor="end" font-size="14">
85 <text>no max / media</text>
86 <text y="25">invalid max values</text>
87 <text y="50">max &lt; active dur</text>
88 <text y="75">max &gt; active dur</text>
90 <text y="150">min &lt; max</text>
91 <text y="175">min = max</text>
92 <text y="200">min &gt; max (both ignored)</text>
93 </g>
95 <g id="timeMarkersText" transform="translate(150, 25)" text-anchor="middle" font-size="14">
96 <text>&gt; 5s</text>
97 <text x="80">0s-5s</text>
98 </g>
100 <g transform="translate(150,40)" stroke="black">
101 <defs>
102 <rect id="shadow" x="-6" y="-6" width="12" height="12" fill="#ccc" stroke="black" stroke-width="1"/>
103 </defs>
105 <g id="setOne">
106 <use xlink:href="#shadow" x="0"/>
107 <use xlink:href="#shadow" x="80"/>
109 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
110 <set id="firstSet" attributeName="x" to="74" end="5s"/>
111 </rect>
113 <g transform="translate(20, 0)">
114 <use xlink:href="#shadow" x="0"/>
115 <use xlink:href="#shadow" x="80"/>
117 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
118 <set attributeName="x" to="74" end="5s" max="media"/>
119 </rect>
120 </g>
121 </g>
123 <g id="setTwo" transform="translate(0, 25)">
124 <use xlink:href="#shadow" x="0"/>
125 <use xlink:href="#shadow" x="80"/>
127 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
128 <set attributeName="x" to="74" max="-6s" end="5s"/>
129 </rect>
131 <g transform="translate(20, 0)">
132 <use xlink:href="#shadow" x="0"/>
133 <use xlink:href="#shadow" x="80"/>
135 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
136 <set attributeName="x" to="74" end="5s" max="foo"/>
137 </rect>
138 </g>
139 </g>
141 <g id="setThree" transform="translate(0, 50)">
142 <use xlink:href="#shadow" x="0"/>
143 <use xlink:href="#shadow" x="80"/>
145 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
146 <set attributeName="x" to="74" max="5s" end="8s"/>
147 </rect>
148 </g>
150 <g id="setFour" transform="translate(0, 75)">
151 <use xlink:href="#shadow" x="0"/>
152 <use xlink:href="#shadow" x="80"/>
154 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
155 <set attributeName="x" to="74" max="8s" dur="indefinite" end="5s"/>
156 </rect>
157 </g>
159 <g id="setFive" transform="translate(0, 150)">
160 <use xlink:href="#shadow" x="0"/>
161 <use xlink:href="#shadow" x="80"/>
163 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
164 <set attributeName="x" to="74" min="2s" max="5s" dur="indefinite"/>
165 </rect>
166 </g>
168 <g id="setSix" transform="translate(0, 175)">
169 <use xlink:href="#shadow" x="0"/>
170 <use xlink:href="#shadow" x="80"/>
172 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
173 <set attributeName="x" to="74" min="5s" max="5s" dur="indefinite"/>
174 </rect>
175 </g>
177 <g id="setSeven" transform="translate(0, 200)">
178 <use xlink:href="#shadow" x="0"/>
179 <use xlink:href="#shadow" x="80"/>
181 <rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)">
182 <set attributeName="x" to="74" min="8s" max="2s" end="5s"/>
183 </rect>
184 </g>
186 </g>
187 </g>
188 </svg>