chromium/third_party/blink/web_tests/svg/animations/animationElementTiming-use-counter.html

<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<svg width="400" height="400">
    <rect x="10" y="10" width="80" height="80">
        <animate id="anim" attributeName="x" from="10" to="310" dur="10s" begin="70s"/>
    </rect>
</svg>
<script>
'use strict';

// From UseCounter.h
var SVGSMILAnimationElementTiming = 1504;
var SVGSMILBeginEndAnimationElement = 1505;

test(() => {
    var animation = document.getElementById('anim');
    assert_false(internals.isUseCounted(document, SVGSMILBeginEndAnimationElement));
    animation.beginElement();
    assert_true(internals.isUseCounted(document, SVGSMILBeginEndAnimationElement));

    assert_false(internals.isUseCounted(document, SVGSMILAnimationElementTiming));
    animation.getStartTime();
    assert_true(internals.isUseCounted(document, SVGSMILAnimationElementTiming));
}, 'getStartTime is use counted');

</script>