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

Unified Diff: third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html

Issue 2694103009: Support animating <time> custom properties (Closed)
Patch Set: Undo git fail Created 3 years, 10 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/LayoutTests/animations/custom-properties/time-type-interpolation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html
diff --git a/third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html b/third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..953848c2f585bc292e2f1a8c03230e2fbf62ff19
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+.parent {
+ --time: 30s;
+}
+.target {
+ --time: 10s;
+}
+</style>
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+CSS.registerProperty({
+ name: '--time',
+ syntax: '<time>',
+ initialValue: '40s',
+});
+
+assertInterpolation({
+ property: '--time',
+ from: neutralKeyframe,
+ to: '20s',
+}, [
+ {at: -0.3, is: '7s'},
+ {at: 0, is: '10s'},
+ {at: 0.5, is: '15s'},
+ {at: 1, is: '20s'},
+ {at: 1.5, is: '25s'},
+]);
+
+assertInterpolation({
+ property: '--time',
+ from: 'initial',
+ to: '20s',
+}, [
+ {at: -0.3, is: '46s'},
+ {at: 0, is: '40s'},
+ {at: 0.5, is: '30s'},
+ {at: 1, is: '20s'},
+ {at: 1.5, is: '10s'},
+]);
+
+assertInterpolation({
+ property: '--time',
+ from: 'inherit',
+ to: '20s',
+}, [
+ {at: -0.3, is: '33s'},
+ {at: 0, is: '30s'},
+ {at: 0.5, is: '25s'},
+ {at: 1, is: '20s'},
+ {at: 1.5, is: '15s'},
+]);
+
+assertInterpolation({
+ property: '--time',
+ from: 'unset',
+ to: '20s',
+}, [
+ {at: -0.3, is: '46s'},
+ {at: 0, is: '40s'},
+ {at: 0.5, is: '30s'},
+ {at: 1, is: '20s'},
+ {at: 1.5, is: '10s'},
+]);
+
+assertInterpolation({
+ property: '--time',
+ from: '-10s',
+ to: '10s',
+}, [
+ {at: -0.3, is: '-16s'},
+ {at: 0, is: '-10s'},
+ {at: 0.5, is: '0s'},
+ {at: 1, is: '10s'},
+ {at: 1.5, is: '20s'},
+]);
+
+assertInterpolation({
+ property: '--time',
+ from: '100ms',
+ to: '200ms',
+}, [
+ {at: -0.3, is: '0.07s'},
+ {at: 0, is: '0.1s'},
+ {at: 0.5, is: '0.15s'},
+ {at: 1, is: '0.2s'},
+ {at: 1.5, is: '0.25s'},
+]);
+
+assertInterpolation({
+ property: '--time',
+ from: '1000ms',
+ to: '11s',
+}, [
+ {at: -0.3, is: '-2s'},
+ {at: 0, is: '1s'},
+ {at: 0.5, is: '6s'},
+ {at: 1, is: '11s'},
+ {at: 1.5, is: '16s'},
+]);
+</script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/custom-properties/time-type-interpolation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698