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

Unified Diff: LayoutTests/animations/resources/composited-animations-data/timing-function.js

Issue 1270303002: Composited Animations: Introduce pixel-ref layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@disable
Patch Set: Use CSS styles instead of custom flags. Created 5 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
Index: LayoutTests/animations/resources/composited-animations-data/timing-function.js
diff --git a/LayoutTests/animations/resources/composited-animations-data/timing-function.js b/LayoutTests/animations/resources/composited-animations-data/timing-function.js
new file mode 100644
index 0000000000000000000000000000000000000000..785efed65edb93fd4a52eaa9a13085e5ccdf4e7d
--- /dev/null
+++ b/LayoutTests/animations/resources/composited-animations-data/timing-function.js
@@ -0,0 +1,72 @@
+var translateSteps = {
+ keyframes: [
+ {transform: 'translateX(100px)'},
+ {transform: 'translateX(500px)'}
+ ],
+ easing: 'steps(9)',
+ style: `background: maroon; float: none;`,
+ samples: [
+ {at: 0},
+ {at: 0.25},
+ {at: 0.5},
+ {at: 0.75},
+ {at: 1.1},
+ ]
+};
+
+var translateStepsPerKeyframe = {
+ keyframes: [
+ {transform: 'translateX(100px)', easing: 'steps(18)'},
+ {transform: 'translateX(400px)', easing: 'steps(9)'},
+ {transform: 'translateX(500px)'}
+ ],
+ style: `background: navy; float: none;`,
+ samples: [
+ {at: 0},
+ {at: 0.25},
+ {at: 0.35},
+ {at: 0.5},
+ {at: 0.65},
+ {at: 0.75},
+ {at: 1.1},
+ ]
+};
+
+var translateStepsWithCubicBezier = {
+ keyframes: [
+ {transform: 'translateX(100px)', easing: 'steps(9)'},
+ {transform: 'translateX(500px)'}
+ ],
+ easing: 'cubic-bezier(.5, -1, .5, 2)',
+ style: `background: black; float: none;`,
+ samples: [
+ {at: 0},
+ {at: 0.4},
+ {at: 0.45},
+ {at: 0.5},
+ {at: 0.6},
+ {at: 1.41},
+ ]
+};
+
+var translateCubicBezierWithSteps = {
+ keyframes: [
+ {transform: 'translateX(100px)', easing: 'cubic-bezier(.5, -1, .5, 2)'},
+ {transform: 'translateX(500px)'}
+ ],
+ easing: 'steps(9)',
+ style: `background: peru; float: none;`,
+ samples: [
+ {at: 0},
+ {at: 0.25},
+ {at: 0.35},
+ {at: 0.5},
+ {at: 0.65},
+ {at: 0.75},
+ {at: 1.39},
+ ]
+};
+
+var timingFunctionTests = [translateSteps, translateStepsPerKeyframe,
+ translateStepsWithCubicBezier, translateCubicBezierWithSteps];
+

Powered by Google App Engine
This is Rietveld 408576698