blob: b3e107062121631122596651e4eeee11617e6470 [file] [log] [blame]
<svg>
<filter id="filter">
<feDiffuseLighting>
<feSpotLight>
<animate id="animate" attributeName="limitingConeAngle" from="0" to="1" dur="1s" repeatCount="indefinite">
</feSpotLight>
</feDiffuseLighting>
</filter>
<rect id="rect" width="1" height="1" filter="url(#filter)">
</svg>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText()
layoutTestController.waitUntilDone()
}
window.onload = function() {
animate = document.getElementById('animate')
retry = true
function runTest() {
if (retry) { // Wait for at least one animation frame before reparenting.
lastAnimVal = animate.parentElement.limitingConeAngle.animVal
if (lastAnimVal > 0) {
animate.appendChild(document.getElementById('rect'))
retry = false
}
// Wait for at least one more animation frame so we know it succeeded.
} else if (lastAnimVal != animate.parentElement.limitingConeAngle.animVal) {
document.body.appendChild(document.createTextNode('PASS - Test succeeded.'))
if (window.layoutTestController)
layoutTestController.notifyDone()
return
}
setTimeout(runTest, 0)
}
runTest()
}
</script>
<p>This test moves an animated filter target. The test will display a message below if successful.</p>