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

Unified Diff: LayoutTests/animations/sample-on-last-keyframe.html

Issue 23451031: Fix AnimationBase::fractionalTime() to handle a scale of infinity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added expected result Created 7 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/sample-on-last-keyframe.html
diff --git a/LayoutTests/animations/sample-on-last-keyframe.html b/LayoutTests/animations/sample-on-last-keyframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..99cd8b57c45b9e26a52df081ced6b14cc9be4a55
--- /dev/null
+++ b/LayoutTests/animations/sample-on-last-keyframe.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style type="text/css" media="screen">
+ #test {
+ animation-name: test;
+ animation-direction: reverse;
+ /*
+ A non-reversed iteration runs in the range [0, <duration>), so to sample
+ on the last keyframe we have to sample at the start of a reversed
+ iteration.
+ */
+ animation-duration: 1s;
+ }
+ @keyframes test {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+ }
+ </style>
+ <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+ <script type="text/javascript" charset="utf-8">
+
+ const expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["test", 0, "test", "opacity", 1.0, 0.1],
+ ];
+
+ runAnimationTest(expectedValues);
+ </script>
+</head>
+<body>
+<p>Tests sampling a keyframe animation on the last keyframe.</p>
+<div id="test"></div>
+<div id="result">
+</div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698