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

Side by Side Diff: LayoutTests/animations/events-with-short-duration-and-delay.html

Issue 23173007: Web Animations: Fix CSS events to handle animations with very short durations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 4 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test animations with repeated iterations and short loops</title> 4 <title>Test events when the animation has a short duration and is delayed</tit le>
5 <style> 5 <style>
6 #box { 6 #box {
7 position: relative; 7 position: relative;
8 left: 100px; 8 left: 100px;
9 top: 10px; 9 top: 10px;
10 height: 100px; 10 height: 100px;
11 width: 100px; 11 width: 100px;
12 -webkit-animation-duration: 0.001s; 12 -webkit-animation-duration: 0.001s;
13 -webkit-animation-delay: 0.001s;
13 -webkit-animation-name: anim; 14 -webkit-animation-name: anim;
14 background-color: #999; 15 background-color: #999;
15 -webkit-animation-iteration-count: 2; 16 -webkit-animation-iteration-count: 2;
16 } 17 }
17 @-webkit-keyframes anim { 18 @-webkit-keyframes anim {
18 from { left: 200px; } 19 from { left: 200px; }
19 to { left: 300px; } 20 to { left: 300px; }
20 } 21 }
21 </style> 22 </style>
22 <script> 23 <script>
23 if (window.testRunner) { 24 if (window.testRunner) {
24 testRunner.dumpAsText(); 25 testRunner.dumpAsText();
25 testRunner.waitUntilDone(); 26 testRunner.waitUntilDone();
26 } 27 }
27 28
28 onload = function() 29 onload = function()
29 { 30 {
31 document.addEventListener('webkitAnimationStart', function() {
32 document.getElementById('result').innerHTML = 'PASS: got webkitAnima tionStart event';
33 }, false);
30 document.addEventListener('webkitAnimationEnd', function() { 34 document.addEventListener('webkitAnimationEnd', function() {
31 document.getElementById('result').innerHTML = 'PASS: got webkitAnima tionEnd event'; 35 document.getElementById('result').innerHTML += '<br>PASS: got webkit AnimationEnd event';
32 if (window.testRunner) 36 if (window.testRunner)
33 testRunner.notifyDone(); 37 testRunner.notifyDone();
34 }, false); 38 }, false);
35 39
36 // Animation begins once we append the DOM node to the document. 40 // Animation begins once we append the DOM node to the document.
37 var boxNode = document.createElement('div'); 41 var boxNode = document.createElement('div');
38 boxNode.id = 'box'; 42 boxNode.id = 'box';
39 document.body.appendChild(boxNode); 43 document.body.appendChild(boxNode);
40 } 44 }
41 </script> 45 </script>
42 </head> 46 </head>
43 <body> 47 <body>
44 Checks that we still end an animation properly (i.e. fire a webkitAnimationEnd 48 Test events when the animation has a short duration and is delayed.
45 event) when using more than one iteration with very short durations. 49 <pre id="result">FAIL: No events received</pre>
46 <pre id="result">FAIL: no webkitAnimationEnd event received</pre>
47 </body> 50 </body>
48 </html> 51 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/animations/events-with-short-duration-and-delay-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698