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> |