Bug 526536: Add some testcases that should be fixed by syncbase timing patches. (tests-only change)

This commit is contained in:
Daniel Holbert 2010-01-12 12:00:50 -08:00
parent 27c6a0f20c
commit 87f5624561
7 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg"
class="reftest-wait"
onload="setTimeout('boom()', 0)">
<script type="text/javascript">
<![CDATA[
function boom()
{
document.getElementById("anim").setAttribute("fill", "freeze");
document.documentElement.removeAttribute("class");
}
]]>
</script>
<g transform="translate(50 50)">
<circle r="40" style="fill: yellow; stroke: black; stroke-width: 1">
<animate id="anim" attributeName="cx" attributeType="XML"
values="0; 200" dur="2s" begin="-1s" repeatCount="0.5"/>
</circle>
</g>
</svg>

After

Width:  |  Height:  |  Size: 565 B

View File

@ -1,5 +1,6 @@
load 523188-1.svg
load 525099-1.svg
load 526536-1.svg
load 526875-1.svg
load 526875-2.svg
load 529387-1.xhtml

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="reftest-wait"
onload="go()">
<!-- This test checks for correct behavior when fill="freeze" is applied
*after* the end of an animation's interval. In this case, we immediately
seek to a time after the end, so that no samples will have been taken
when we apply fill="freeze". -->
<script>
function go() {
var svg = document.documentElement;
svg.pauseAnimations();
svg.setCurrentTime(4.0);
document.getElementById("anim").setAttribute("fill", "freeze");
svg.removeAttribute("class");
}
</script>
<rect id="blueRect" x="15" y="15" width="200" height="100" fill="blue">
<animate id="anim" attributeName="height"
to="200" begin="0s" dur="2s"/>
</rect>
</svg>

After

Width:  |  Height:  |  Size: 845 B

View File

@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="reftest-wait"
onload="go()">
<!-- This test checks for correct behavior when fill="freeze" is applied
*after* the end of an animation's interval. In this case, we take one
sample partway through the animation. Then we immediately seek to a
time after the end, so that only the one sample will have been taken
when we apply fill="freeze". -->
<script>
function go() {
var svg = document.documentElement;
svg.pauseAnimations();
svg.setCurrentTime(1.0);
svg.setCurrentTime(4.0);
document.getElementById("anim").setAttribute("fill", "freeze");
svg.removeAttribute("class");
}
</script>
<rect id="blueRect" x="15" y="15" width="200" height="100" fill="blue">
<animate id="anim" attributeName="height"
to="200" begin="0s" dur="2s"/>
</rect>
</svg>

After

Width:  |  Height:  |  Size: 948 B

View File

@ -0,0 +1,23 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="reftest-wait"
onload="go()">
<!-- This test checks for correct behavior when fill="freeze" is applied when
the only interval on an animation is entirely before the document begins
(before 0). The SMIL Animation spec says that such intervals should be
filtered out[1] (ignored). So, since we have no valid intervals,
applying fill="freeze" shouldn't have any effect in this case.
[1] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-BeginEnd-LC-Start
-->
<script>
function go() {
var svg = document.documentElement;
document.getElementById("anim").setAttribute("fill", "freeze");
svg.removeAttribute("class");
}
</script>
<rect id="blueRect" x="15" y="15" width="200" height="200" fill="blue">
<animate id="anim" attributeName="height"
to="100" begin="-2s" dur="2s"/>
</rect>
</svg>

After

Width:  |  Height:  |  Size: 992 B

View File

@ -0,0 +1,30 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
class="reftest-wait"
onload="go()">
<!-- This test checks for correct behavior when fill="freeze" is applied when
one interval on an animation is entirely before the document begins
(before 0), and a second interval is at least partly after the document
begins (yet before our first sample, since we immediately seek forward
on document load).
The SMIL Animation spec says that the former interval should be
filtered out[1] (ignored), but the latter should not. So, because of
the latter interval, applying fill="freeze" should have an effect in
this case.
[1] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-BeginEnd-LC-Start
-->
<script>
function go() {
var svg = document.documentElement;
svg.pauseAnimations();
svg.setCurrentTime(4.0);
document.getElementById("anim").setAttribute("fill", "freeze");
svg.removeAttribute("class");
}
</script>
<rect id="blueRect" x="15" y="15" width="200" height="100" fill="blue">
<animate id="anim" attributeName="height"
to="200" begin="-3s; -1s" dur="2s"/>
</rect>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -123,3 +123,8 @@ fails == anim-strokewidth-1xml.svg anim-standard-ref.svg # bug 534028
== anim-y-interp-4.svg anim-y-interp-4-ref.svg
== anim-y-interp-5.svg anim-y-interp-5-ref.svg
== anim-y-interp-6.svg anim-y-interp-6-ref.svg
== freeze-applied-late-1.svg anim-standard-ref.svg
== freeze-applied-late-2.svg anim-standard-ref.svg
== freeze-applied-late-3.svg anim-standard-ref.svg
== freeze-applied-late-4.svg anim-standard-ref.svg