| 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-70-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 the animation's SMIL fill attribute. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
On the first row, the <set> animation has its dur |
| 22 |
attribute set to '1s' and its begin attribute set to '0s; |
| 23 |
firstSet.end + 1s'. The fill attribute is unspecified, so |
| 24 |
the effect is as if it was set to 'remove', because 'remove' is |
| 25 |
the default value for fill. |
| 26 |
|
| 27 |
Consequently, the first interval is (0s <= t < 1s), the second is |
| 28 |
(2s <= t < 3s), the third, (4s <= t < 5s) etc.. The red rectangle starts on the |
| 29 |
right position, moves to the left position for one second, moves |
| 30 |
to the right for 1 second, and so on. |
| 31 |
</p> |
| 32 |
<p> |
| 33 |
On the second row, the <set> animation |
| 34 |
with the identifier 'firstSet' has its dur attribute |
| 35 |
set to 1s and its begin attribute set to '0s; firstSet.end'. The fill attribute |
| 36 |
is set to 'remove'. The behavior should be exactly the same as for the previous |
| 37 |
row, and the rectangle moves from the right position to the left position |
| 38 |
every second. |
| 39 |
</p> |
| 40 |
<p> |
| 41 |
On the third row, the <set> animation has its dur attribute set to |
| 42 |
1s and its begin attribute set to '0s; firstSet.end'. The fill attribute |
| 43 |
is set to 'freeze'. The first interval should be (0s <= t < 1s), the second (2s <= t < 3s), |
| 44 |
the third, (4s <= t < 5s), etc. Between interval, the fill behavior should be applied, |
| 45 |
so the red rectangle should stay on the right position and never go to the |
| 46 |
left position. |
| 47 |
</p> |
| 48 |
<p> |
| 49 |
On the fourth row, the <set> animation has its dur attribute set to |
| 50 |
1s and its begin attribute set to '0s'. The fill attribute |
| 51 |
is set to 'freeze'. The first interval should be (0s <= t < 1s) and there is no |
| 52 |
following interval. Because of the fill behavior, the <set> should |
| 53 |
apply the last (and only) animation value after 1s. Consequently, the |
| 54 |
red rectangle should stay on the right position and never go to the |
| 55 |
left position. |
| 56 |
</p> |
| 57 |
</d:testDescription> |
| 58 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 59 |
<p>Run the test and observe it for at least 5 seconds. No interaction required.</p> |
| 60 |
</d:operatorScript> |
| 61 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 62 |
<p>The test passes if for the duration of the test the following conditions are met:</p> |
| 63 |
<ul> |
| 64 |
<li>The red squares in the top two rows alternate between the left and the right column |
| 65 |
at a rate of one movement per second. They must also be in the same column |
| 66 |
at any given time.</li> |
| 67 |
<li>The red squares in the bottom two rows stay in the right column.</li> |
| 68 |
</ul> |
| 69 |
</d:passCriteria> |
| 70 |
</d:SVGTestCase> |
| 71 |
<title id="test-title">$RCSfile: animate-elem-70-t.svg,v $</title> |
| 72 |
<defs> |
| 73 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 74 |
<font-face-src> |
| 75 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 76 |
</font-face-src> |
| 77 |
</font-face> |
| 78 |
</defs> |
| 79 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 80 |
<text text-anchor="middle" x="240" y="30" font-size="20">fill</text> |
| 81 |
<g transform="translate(130, 60)"> |
| 82 |
<g transform="translate(120,45)" text-anchor="end" font-size="14"> |
| 83 |
<text>fill unspecified (remove)</text> |
| 84 |
<text y="25">fill=remove</text> |
| 85 |
<text y="100">fill=freeze (with restart)</text> |
| 86 |
<text y="125">fill=freeze (no restart)</text> |
| 87 |
</g> |
| 88 |
|
| 89 |
<g id="timeMarkersText" transform="translate(180, 125)" text-anchor="middle" font-size="14"> |
| 90 |
<text y="-15">never</text> |
| 91 |
<text>here</text> |
| 92 |
<text y="-15" x="80">always</text> |
| 93 |
<text x="80">here</text> |
| 94 |
</g> |
| 95 |
|
| 96 |
<g transform="translate(180,40)" stroke="black"> |
| 97 |
<defs> |
| 98 |
<rect id="shadow" x="-6" y="-6" width="12" height="12" fill="#ccc" stroke="black" stroke-width="1"/> |
| 99 |
</defs> |
| 100 |
|
| 101 |
<g id="setOne"> |
| 102 |
<use xlink:href="#shadow" x="0"/> |
| 103 |
<use xlink:href="#shadow" x="80"/> |
| 104 |
|
| 105 |
<rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)"> |
| 106 |
<set id="firstSet" attributeName="x" to="74" begin="0s; firstSet.end + 1s" dur="1s"/> |
| 107 |
</rect> |
| 108 |
|
| 109 |
</g> |
| 110 |
|
| 111 |
<g id="setTwo" transform="translate(0, 25)"> |
| 112 |
<use xlink:href="#shadow" x="0"/> |
| 113 |
<use xlink:href="#shadow" x="80"/> |
| 114 |
|
| 115 |
<rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)"> |
| 116 |
<set id="secondSet" attributeName="x" to="74" begin="0s; secondSet.end + 1s" dur="1s" fill="remove"/> |
| 117 |
</rect> |
| 118 |
|
| 119 |
</g> |
| 120 |
|
| 121 |
<g id="setThree" transform="translate(0, 100)"> |
| 122 |
<use xlink:href="#shadow" x="0"/> |
| 123 |
<use xlink:href="#shadow" x="80"/> |
| 124 |
|
| 125 |
<rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)"> |
| 126 |
<set id="thirdSet" attributeName="x" to="74" begin="0s; thirdSet.end + 1s" dur="1s" fill="freeze"/> |
| 127 |
</rect> |
| 128 |
</g> |
| 129 |
|
| 130 |
|
| 131 |
<g id="setFour" transform="translate(0, 125)"> |
| 132 |
<use xlink:href="#shadow" x="0"/> |
| 133 |
<use xlink:href="#shadow" x="80"/> |
| 134 |
|
| 135 |
<rect x="-6" y="-6" width="12" height="12" fill="rgb(204,0,102)"> |
| 136 |
<set id="fourthSet" attributeName="x" to="74" begin="0s" dur="1s" fill="freeze"/> |
| 137 |
</rect> |
| 138 |
</g> |
| 139 |
</g> |
| 140 |
</g> |
| 141 |
</g> |
| 142 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 143 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 144 |
</g> |
| 145 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/> |
| 146 |
<!-- comment out this watermark once the test is approved --> |
| 147 |
<!--<g id="draft-watermark"> |
| 148 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 149 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 150 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 151 |
</g>--> |
| 152 |
</svg> |