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

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

Issue 2164233002: Use-count when SMIL animation renders a frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@smil-use-counters
Patch Set: Rebase again Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/animations/animation-started-use-counter.html
diff --git a/third_party/WebKit/LayoutTests/svg/animations/animation-started-use-counter.html b/third_party/WebKit/LayoutTests/svg/animations/animation-started-use-counter.html
new file mode 100644
index 0000000000000000000000000000000000000000..3f0fadb015032e86e91ea1da2628fa164ca1da28
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/animations/animation-started-use-counter.html
@@ -0,0 +1,41 @@
+<!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">
+ </rect>
+</svg>
+<script>
+'use strict';
+
+// From UseCounter.h
+var SVGSMILAnimationAppliedEffect = 1477;
+
+var testHandle = async_test("Count when SMIL animation has been applied");
+
+requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ testHandle.step(function() {
+ var animation = document.createElementNS("http://www.w3.org/2000/svg", "animate");
+ animation.setAttribute("attributeType", "XML");
+ animation.setAttribute("attributeName", "y");
+ animation.setAttribute("from", "210");
+ animation.setAttribute("to", "310");
+ animation.setAttribute("begin", "-5");
+ animation.setAttribute("dur", "20");
+ target.appendChild(animation);
+ assert_false(internals.isUseCounted(document, SVGSMILAnimationAppliedEffect));
+ });
+
+ requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ testHandle.step(function() {
+ assert_true(internals.isUseCounted(document, SVGSMILAnimationAppliedEffect));
+ testHandle.done();
+ });
+ });
+ });
+ });
+});
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698