blob: 079521c0cc837a5098f6eb21c3944e87f54c26f9 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<svg width="400" height="400">
<rect id="target" x="10" y="10" width="80" height="80">
<animate attributeType="XML" attributeName="x" from="10" to="110" begin="-20" dur="10" repeatCount="3" accumulate="none" />
</rect>
</svg>
<script>
'use strict';
// From UseCounter.h
var SVGSMILAdditiveAnimation = 1484;
async_test(function(testHandle) {
window.onload = function() {
var animation = document.createElementNS("http://www.w3.org/2000/svg", "animate");
animation.setAttribute("attributeType", "XML");
animation.setAttribute("attributeName", "y");
animation.setAttribute("from", "10");
animation.setAttribute("to", "110");
animation.setAttribute("begin", "-20");
animation.setAttribute("dur", "10");
animation.setAttribute("repeatCount", "3");
animation.setAttribute("accumulate", "sum");
requestAnimationFrame(testHandle.step_func(function() {
assert_false(internals.isUseCounted(document, SVGSMILAdditiveAnimation));
target.appendChild(animation);
requestAnimationFrame(testHandle.step_func_done(function() {
assert_true(internals.isUseCounted(document, SVGSMILAdditiveAnimation));
}));
}));
};
}, "Accumulate SMIL animation is counted");
</script>