Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/WebKit/LayoutTests/svg/animations/beginEndAnimationElement-use-counter.html

Issue 2243173002: SVG: Use counters for SMIL methods on animation elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..eb12fafbc13d26621594c84f773ab3a906aad352
--- /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 = 1504;
+var SVGSMILBeginEndAnimationElement = 1505;
+
+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>

Powered by Google App Engine
This is Rietveld 408576698