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

Unified Diff: LayoutTests/animations/animation-properties-in-keyframe-are-ignored.html

Issue 24085002: Correctly apply per-keyframe timing functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/animation-properties-in-keyframe-are-ignored-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/animations/animation-properties-in-keyframe-are-ignored.html
diff --git a/LayoutTests/animations/animation-properties-in-keyframe-are-ignored.html b/LayoutTests/animations/animation-properties-in-keyframe-are-ignored.html
new file mode 100644
index 0000000000000000000000000000000000000000..779e17c57e9d03443b1cd71800a95db8d9e18bcf
--- /dev/null
+++ b/LayoutTests/animations/animation-properties-in-keyframe-are-ignored.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css" media="screen">
+ div#target {
+ -webkit-animation: 4s test;
+ background-color: red;
+ position: relative;
+ width: 100px;
+ height: 100px;
+ }
+ @-webkit-keyframes test {
+ from {
+ left: 0px;
+ -webkit-animation-timing-function: linear;
+ /* These should be ignored */
+ -webkit-animation-name: bogus;
+ -webkit-animation-duration: 10s;
+ -webkit-animation-iteration-count: 10;
+ -webkit-animation-direction: reverse;
+ -webkit-animation-play-state: paused;
+ -webkit-animation-delay: 10s;
+ -webkit-animation-fill-mode: forwards;
+ }
+ to {
+ left: 200px;
+ -webkit-animation-timing-function: linear;
+ /* These should be ignored */
+ -webkit-animation-name: bogus;
+ -webkit-animation-duration: 10s;
+ -webkit-animation-iteration-count: 10;
+ -webkit-animation-direction: reverse;
+ -webkit-animation-play-state: paused;
+ -webkit-animation-delay: 10s;
+ -webkit-animation-fill-mode: forwards;
+ }
+ }
+ </style>
+ <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ const expectedValues = [
+ // [time, element-id, property, expected-value, tolerance]
+ [0, "target", "left", 0, 5],
+ [1, "target", "left", 50, 5],
+ [2, "target", "left", 100, 5],
+ [3, "target", "left", 150, 5],
+ [4, "target", "left", "auto", 0],
+ [5, "target", "left", "auto", 0],
+ ];
+
+ runAnimationTest(expectedValues);
+ </script>
+</head>
+<body>
+<p>Tests that animation properties specified in a keyframe are ignored, with the exception of timing function.</p>
+<div id="target"></div>
+<div id="result"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/animations/animation-properties-in-keyframe-are-ignored-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698