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

Unified Diff: third_party/WebKit/LayoutTests/animations/animate-shorthand-var.html

Issue 2340893003: Support interpolation of animatable shorthand properties containing var() (Closed)
Patch Set: Update DCHECK Created 4 years, 3 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/animation/CSSInterpolationType.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/animate-shorthand-var.html
diff --git a/third_party/WebKit/LayoutTests/animations/animate-shorthand-var.html b/third_party/WebKit/LayoutTests/animations/animate-shorthand-var.html
new file mode 100644
index 0000000000000000000000000000000000000000..089ec3be2641718526e2de5e011c52dffaefa03a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/animate-shorthand-var.html
@@ -0,0 +1,28 @@
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<style>
+body {
+ --x: green;
+ --y: lime;
+}
+@keyframes test {
+ from { background: var(--x); }
+ to { background: var(--y); }
+}
+#cssAnimations {
+ animation: test 1s -0.5s linear paused;
+}
+</style>
+<div id="cssAnimations"></div>
+<div id="webAnimations"></div>
+<script>
+test(() => {
+ assert_equals(getComputedStyle(cssAnimations).backgroundColor, 'rgb(0, 192, 0)');
+}, 'CSS Animations should interpolate shorthand properties with variable references in them.');
+
+test(() => {
+ var animation = webAnimations.animate({background: ['var(--x)', 'var(--y)']}, 1);
+ animation.currentTime = 0.5;
+ assert_equals(getComputedStyle(webAnimations).backgroundColor, 'rgb(0, 192, 0)');
+}, 'Web Animations should interpolate shorthand properties with variable references in them.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/CSSInterpolationType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698