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

Unified Diff: third_party/WebKit/LayoutTests/animations/custom-properties/registered-neutral-keyframe.html

Issue 2630503002: Add code path for registered custom properties in CSSInterpolationType (Closed)
Patch Set: Moar buttons Created 3 years, 11 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/animations/custom-properties/registered-neutral-keyframe.html
diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/registered-neutral-keyframe.html b/third_party/WebKit/LayoutTests/animations/custom-properties/registered-neutral-keyframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..37c12c5b7a102f200f350519cb7a0888b4a005fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/custom-properties/registered-neutral-keyframe.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+@keyframes test {
+ to { --x: to; }
+}
+#target {
+ --x: underlying;
+ animation: test 1s;
+}
+</style>
+<div id="target"></div>
+<script>
+CSS.registerProperty({
+ name: '--x',
+ syntax: '*',
+});
+
+test(() => {
+ target.style.animationDelay = '-0.25s';
+ assert_equals(getComputedStyle(target).getPropertyValue('--x'), ' underlying', 'at 25%');
+
+ target.style.animationDelay = '-0.75s';
+ assert_equals(getComputedStyle(target).getPropertyValue('--x'), ' to', 'at 25%');
+}, 'CSS Animations neutral keyframes on registered custom properties should produce the underlying value');
+</script>

Powered by Google App Engine
This is Rietveld 408576698