2009-01-14 20:38:07 -08:00
|
|
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
|
onload="go()"
|
|
|
|
class="reftest-wait"
|
|
|
|
>
|
|
|
|
<script type="application/javascript">
|
2010-03-21 12:23:30 -07:00
|
|
|
function go() {
|
2009-01-14 20:38:07 -08:00
|
|
|
// Try calling the animation-related methods in nsSVGSVGElement.cpp
|
|
|
|
// If any aren't implemented, we'll throw an exception and
|
|
|
|
// the rect will stay red.
|
|
|
|
|
|
|
|
try {
|
|
|
|
document.documentElement.animationsPaused();
|
|
|
|
document.documentElement.pauseAnimations();
|
|
|
|
document.documentElement.unpauseAnimations();
|
|
|
|
document.documentElement.getCurrentTime();
|
|
|
|
document.documentElement.setCurrentTime(0);
|
|
|
|
} catch (e) {
|
2010-03-21 12:23:30 -07:00
|
|
|
// If something failed and threw an exception, we still need to remove
|
|
|
|
// the "reftest-wait" class
|
2009-01-14 20:38:07 -08:00
|
|
|
document.documentElement.removeAttribute("class");
|
|
|
|
throw e;
|
|
|
|
}
|
|
|
|
|
|
|
|
// If we get here, we're successful!
|
|
|
|
// Change the rect color.
|
|
|
|
var rect = document.getElementById("rect");
|
|
|
|
rect.setAttributeNS(null, "fill", "lime");
|
|
|
|
document.documentElement.removeAttribute("class");
|
|
|
|
}
|
|
|
|
</script>
|
2010-03-21 12:23:30 -07:00
|
|
|
<rect id="rect" width="100%" height="100%" fill="red" />
|
2009-01-14 20:38:07 -08:00
|
|
|
</svg>
|