Index: third_party/WebKit/LayoutTests/svg/animations/beginEndAnimationElement-use-counter.html |
diff --git a/third_party/WebKit/LayoutTests/svg/animations/beginEndAnimationElement-use-counter.html b/third_party/WebKit/LayoutTests/svg/animations/beginEndAnimationElement-use-counter.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d6dfed131804a611b63a1ee2a3799df17de58ba7 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/animations/beginEndAnimationElement-use-counter.html |
@@ -0,0 +1,27 @@ |
+<!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="0s"/> |
+ </rect> |
+</svg> |
+<script> |
+'use strict'; |
+ |
+// From UseCounter.h |
+var SVGSMILAnimationElementTiming = 1501; |
+var SVGSMILBeginEndAnimationElement = 1502; |
+ |
+test(() => { |
+ var animation = document.getElementById('anim'); |
+ assert_false(internals.isUseCounted(document, SVGSMILAnimationElementTiming)); |
+ animation.getSimpleDuration(); |
+ assert_true(internals.isUseCounted(document, SVGSMILAnimationElementTiming)); |
+ |
+ assert_false(internals.isUseCounted(document, SVGSMILBeginEndAnimationElement)); |
+ animation.endElement(); |
+ assert_true(internals.isUseCounted(document, SVGSMILBeginEndAnimationElement)); |
+}, 'endElement is use counted'); |
+ |
+</script> |