1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>Test suspendAnimations()/resumeAnimations() for animations</title>
6 <style type="text/css" media="screen">
10 background-color: blue;
11 -webkit-animation-duration: 1.25s;
12 -webkit-animation-timing-function: linear;
13 -webkit-animation-name: "move";
15 @-webkit-keyframes "move" {
16 from { -webkit-transform: translateX(0); }
17 to { -webkit-transform: translateX(500px); }
20 <script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
21 <script type="text/javascript" charset="utf-8">
23 const expectedValues = [
24 // [animation-name, time, element-id, property, expected-value, tolerance]
25 ["rotate", 0.6, "box", "webkitTransform", [1,0,0,1, 200, 0], 30],
26 ["rotate", 0.9, "box", "webkitTransform", [1,0,0,1, 200, 0], 30],
27 ["rotate", 1.5, "box", "webkitTransform", [1,0,0,1, 400, 0], 30],
33 internals.suspendAnimations(document);
39 internals.resumeAnimations(document);
44 setTimeout(suspend, 500);
45 setTimeout(resume, 1000);
48 runAnimationTest(expectedValues, setTimers, undefined, true);
54 This test shows suspend and resume of a box moving to the right 500px. If running inside DumpRenderTest the box should stop at 200px
55 after 500ms and then continue to complete the move in another 750ms