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

Unified Diff: LayoutTests/animations/interpolation/background-color-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
« no previous file with comments | « no previous file | LayoutTests/animations/interpolation/background-color-interpolation-unset.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/animations/interpolation/background-color-interpolation.html
diff --git a/LayoutTests/animations/interpolation/background-color-interpolation.html b/LayoutTests/animations/interpolation/background-color-interpolation.html
index e08181947d60591cb748a36f1c423e69fedd3ef1..1b6e667543f286d5389533204edf0c2cbd982ee1 100644
--- a/LayoutTests/animations/interpolation/background-color-interpolation.html
+++ b/LayoutTests/animations/interpolation/background-color-interpolation.html
@@ -1,15 +1,18 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
+.parent {
+ background-color: #eee;
+}
.target {
width: 60px;
height: 60px;
display: inline-block;
border: 2px solid black;
margin-right: 2px;
+ background-color: black;
}
.expected {
- background-color: green;
margin-right: 15px;
}
</style>
@@ -18,8 +21,57 @@
<script>
assertInterpolation({
property: 'background-color',
+ from: '',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(0, 0, 0)'},
+ {at: 0, is: 'rgb(0, 0, 0)'},
+ {at: 0.3, is: 'rgb(0, 38, 0)'},
+ {at: 0.6, is: 'rgb(0, 77, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+assertInterpolation({
+ property: 'background-color',
+ from: 'initial',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgba(0, 0, 0, 0)'},
+ {at: 0, is: 'rgba(0, 0, 0, 0)'},
+ {at: 0.3, is: 'rgba(0, 128, 0, 0.3)'},
+ {at: 0.6, is: 'rgba(0, 128, 0, 0.6)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+assertInterpolation({
+ property: 'background-color',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgb(255, 255, 255)'},
+ {at: 0, is: 'rgb(238, 238, 238)'},
+ {at: 0.3, is: 'rgb(167, 205, 167)'},
+ {at: 0.6, is: 'rgb(95, 172, 95)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 73, 0)'},
+]);
+assertInterpolation({
+ property: 'background-color',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -0.3, is: 'rgba(0, 0, 0, 0)'},
+ {at: 0, is: 'rgba(0, 0, 0, 0)'},
+ {at: 0.3, is: 'rgba(0, 128, 0, 0.3)'},
+ {at: 0.6, is: 'rgba(0, 128, 0, 0.6)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'background-color',
from: 'white',
- to: 'orange'
+ to: 'orange',
}, [
{at: -0.3, is: 'white'},
{at: 0, is: 'white'},
@@ -28,17 +80,5 @@ assertInterpolation({
{at: 1, is: 'orange'},
{at: 1.5, is: 'rgb(255, 120, 0)'},
]);
-assertInterpolation({
- property: 'background-color',
- from: 'initial',
- to: 'transparent'
-}, [
- {at: -0.3, is: 'transparent'},
- {at: 0, is: 'transparent'},
- {at: 0.3, is: 'transparent'},
- {at: 0.6, is: 'transparent'},
- {at: 1, is: 'transparent'},
- {at: 1.5, is: 'transparent'},
-]);
</script>
</body>
« no previous file with comments | « no previous file | LayoutTests/animations/interpolation/background-color-interpolation-unset.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698