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

Unified Diff: LayoutTests/animations/interpolation/object-position-interpolation.html

Issue 1265873002: Add test coverage for interpolations using CSS wide keywords and neutral keyframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 4 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/interpolation/object-position-interpolation.html
diff --git a/LayoutTests/animations/interpolation/object-position-interpolation.html b/LayoutTests/animations/interpolation/object-position-interpolation.html
index 7a636170b497f7c2448df84e2cdf067f7b4a8be9..2b55a161c1cd553a8e0c7113df0205fa751aac15 100644
--- a/LayoutTests/animations/interpolation/object-position-interpolation.html
+++ b/LayoutTests/animations/interpolation/object-position-interpolation.html
@@ -1,6 +1,9 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
+.parent {
+ object-position: 30px 10px;
+}
.target {
position: relative;
width: 100px;
@@ -9,6 +12,7 @@
display: inline-block;
margin: 20px 0px 20px 0px;
object-fit: fill;
+ object-position: 10px 30px;
}
.expected {
background-color: green;
@@ -17,6 +21,53 @@
<body>
<script src="resources/interpolation-test.js"></script>
<script>
+assertInterpolation({
+ property: 'object-position',
+ from: '',
+ to: '20px 20px',
+}, [
+ {at: -0.3, is: '7px 33px'},
+ {at: 0, is: '10px 30px'},
+ {at: 0.5, is: '15px 25px'},
+ {at: 1, is: '20px 20px'},
+ {at: 1.5, is: '25px 15px'},
+]);
+
+assertInterpolation({
+ property: 'object-position',
+ from: 'initial',
+ to: '20px 20px',
+}, [
+ {at: -0.3, is: 'calc(-6px + 65%) calc(-6px + 65%)'},
+ {at: 0, is: '50% 50%'},
+ {at: 0.5, is: 'calc(10px + 25%) calc(10px + 25%)'},
+ {at: 1, is: '20px 20px'},
+ {at: 1.5, is: 'calc(30px + -25%) calc(30px + -25%)'},
+]);
+
+assertInterpolation({
+ property: 'object-position',
+ from: 'inherit',
+ to: '20px 20px',
+}, [
+ {at: -0.3, is: '33px 7px'},
+ {at: 0, is: '30px 10px'},
+ {at: 0.5, is: '25px 15px'},
+ {at: 1, is: '20px 20px'},
+ {at: 1.5, is: '15px 25px'},
+]);
+
+assertInterpolation({
+ property: 'object-position',
+ from: 'unset',
+ to: '20px 20px',
+}, [
+ {at: -0.3, is: 'calc(-6px + 65%) calc(-6px + 65%)'},
+ {at: 0, is: '50% 50%'},
+ {at: 0.5, is: 'calc(10px + 25%) calc(10px + 25%)'},
+ {at: 1, is: '20px 20px'},
+ {at: 1.5, is: 'calc(30px + -25%) calc(30px + -25%)'},
+]);
assertInterpolation({
property: 'object-position',

Powered by Google App Engine
This is Rietveld 408576698