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

Side by Side Diff: LayoutTests/animations/animation-internals-api.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 <html>
3 <head>
4 <style>
5 #target {
6 position: relative;
7 left: 100px;
8 height: 100px;
9 width: 100px;
10 background-color: blue;
11 -webkit-animation-duration: 1s;
12 -webkit-animation-timing-function: linear;
13 }
14
15 @-webkit-keyframes bounce {
16 from {
17 left: 100px;
18 }
19 to {
20 left: 200px;
21 }
22 }
23
24 </style>
25
26 <script src="resources/animation-test-helpers.js"></script>
27 <script>
28 if (window.testRunner) {
29 testRunner.waitUntilDone();
30 testRunner.dumpAsText();
31 }
32
33 function animationStarted()
34 {
35 if (window.testRunner) {
36 var target = document.getElementById('target');
37 var paused = internals.pauseAnimationAtTimeOnElement("bounce", 1.0, targ et);
38 var result = "";
39 if (paused)
40 result = "PASS: correctly paused animation";
41 else
42 result = "FAIL: failed to pause animation";
43
44 document.getElementById('results').innerText = result;
45 testRunner.notifyDone();
46 } else
47 document.getElementById('results').innerText = "This test requires WebCo re Internals";
48 }
49
50 function startTest()
51 {
52 var target = document.getElementById('target');
53 target.style.webkitAnimationName = "bounce";
54 waitForAnimationToStart(target, animationStarted);
55 }
56 </script>
57 </head>
58 <body onload="startTest()">
59 <!-- Test for Internals pauseAnimationAtTimeOnElement() API -->
60 <div id="target"></div>
61 <div id="results"></div>
62 </body>
63 </html>
OLDNEW
« no previous file with comments | « LayoutTests/animations/animation-hit-test-transform.html ('k') | LayoutTests/animations/animation-internals-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698