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

Unified Diff: LayoutTests/animations/composition/top-composition.html

Issue 1243313002: Migrate the remaining CSS properties interpolable as Lengths to LengthInterpolationType (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add composition tests 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/composition/top-composition.html
diff --git a/LayoutTests/animations/composition/top-composition.html b/LayoutTests/animations/composition/top-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..b3d898e8c91f92aca67b0218e5d3e99de4573cc2
--- /dev/null
+++ b/LayoutTests/animations/composition/top-composition.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+assertComposition({
+ property: 'top',
+ underlying: '50px',
+ addFrom: '100px',
+ addTo: '200px',
+}, [
+ {at: -0.3, is: '120px'},
+ {at: 0, is: '150px'},
+ {at: 0.5, is: '200px'},
+ {at: 1, is: '250px'},
+ {at: 1.5, is: '300px'},
+]);
+
+assertComposition({
+ property: 'top',
+ underlying: '100px',
+ addFrom: '10px',
+ addTo: '2px',
+}, [
+ {at: -0.5, is: '114px'},
+ {at: 0, is: '110px'},
+ {at: 0.5, is: '106px'},
+ {at: 1, is: '102px'},
+ {at: 1.5, is: '98px'},
+]);
+
+assertComposition({
+ property: 'top',
+ underlying: '10%',
+ addFrom: '100px',
+ addTo: '20%',
+}, [
+ {at: -0.3, is: 'calc(130px + 4%)'},
+ {at: 0, is: 'calc(100px + 10%)'},
+ {at: 0.5, is: 'calc(50px + 20%)'},
+ {at: 1, is: '30%'},
+ {at: 1.5, is: 'calc(-50px + 40%)'},
+]);
+
+assertComposition({
+ property: 'top',
+ underlying: '50px',
+ addFrom: '100px',
+ replaceTo: '200px',
+}, [
+ {at: -0.3, is: '135px'},
+ {at: 0, is: '150px'},
+ {at: 0.5, is: '175px'},
+ {at: 1, is: '200px'},
+ {at: 1.5, is: '225px'},
+]);
+
+assertComposition({
+ property: 'top',
+ underlying: '100px',
+ addFrom: '100px',
+ addTo: 'auto',
+}, [
+ {at: -0.3, is: '200px'},
+ {at: 0, is: '200px'},
+ {at: 0.5, is: 'auto'},
+ {at: 1, is: 'auto'},
+ {at: 1.5, is: 'auto'},
+]);
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698