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

Side by Side Diff: LayoutTests/animations/animation-internals-api-multiple-keyframes.html

Issue 14556022: Simplify animation testing API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <style>
6 #target {
7 position: relative;
8 left: 100px;
9 height: 100px;
10 width: 100px;
11 background-color: blue;
12 -webkit-animation-duration: 1s;
13 -webkit-animation-timing-function: linear;
14 }
15
16 @-webkit-keyframes anim {
17 from { left: 10px; }
18 40% { left: 30px; }
19 60% { left: 15px; }
20 to { left: 20px; }
21 }
22 </style>
23
24 <script src="resources/animation-test-helpers.js"></script>
25 <script>
26 if (window.testRunner) {
27 testRunner.waitUntilDone();
28 testRunner.dumpAsText();
29 }
30
31 function animationStarted()
32 {
33 if (window.testRunner) {
34 var target = document.getElementById('target');
35 var paused = internals.pauseAnimationAtTimeOnElement("anim", 1, target);
36 var result;
37 if (paused)
38 result = "PASS: correctly paused animation";
39 else
40 result = "FAIL: failed to pause animation";
41
42 document.getElementById('results').innerText = result;
43 testRunner.notifyDone();
44 } else
45 document.getElementById('results').innerText = "This test requires WebCo re Internals";
46 }
47
48 function startTest()
49 {
50 var target = document.getElementById('target');
51 target.style.webkitAnimationName = "anim";
52 waitForAnimationToStart(target, animationStarted);
53 }
54 </script>
55 </head>
56 <body onload="startTest()">
57 <!-- Test for Internals' pauseAnimationAtTimeOnElement() API on animations wit h multiple keyframes -->
58 <div id="target"></div>
59 <div id="results"></div>
60
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698