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

Unified Diff: LayoutTests/animations/use-count-stacked-neutral-keyframe.html

Issue 1248483005: Add use counter for stacked neutral keyframe in CSS Animations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
Index: LayoutTests/animations/use-count-stacked-neutral-keyframe.html
diff --git a/LayoutTests/animations/use-count-stacked-neutral-keyframe.html b/LayoutTests/animations/use-count-stacked-neutral-keyframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..10d35890900f8f0274361235947386e399b8e6a1
--- /dev/null
+++ b/LayoutTests/animations/use-count-stacked-neutral-keyframe.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<style>
+#target {
+ animation-name: a, b;
+ animation-duration: 1e10s;
+}
+
+@keyframes a {
+ from { left: 1px; }
+ to { left: 1px; }
+}
+
+@keyframes b {
+ from { left: 1px; }
+ to { left: 1px; }
+}
+</style>
+<div id="target"></div>
+<script>
+var CSSAnimationsStackedNeutralKeyframe = 896; // From UseCounter.h
+test(function() {
+ getComputedStyle(target).left; // Force style recalc;
+ assert_false(internals.isUseCounted(document, CSSAnimationsStackedNeutralKeyframe));
+
+ document.styleSheets[0].rules[2].deleteRule('from');
+ getComputedStyle(target).left; // Force style recalc;
+ assert_true(internals.isUseCounted(document, CSSAnimationsStackedNeutralKeyframe));
+});
+</script>
« no previous file with comments | « no previous file | Source/core/animation/css/CSSAnimations.cpp » ('j') | Source/core/animation/css/CSSAnimations.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698