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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/animation-events-unprefixed-03.html

Issue 2411163003: CSS Animations: Reduce usage of setTimeout in Layout tests (Closed)
Patch Set: extra tests Created 4 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Tests that unprefixed animation events are correctly fired when using h tml event listeners (only unprefixed should be fired).</title> 4 <title>Tests that unprefixed animation events are correctly fired when using h tml event listeners (only unprefixed should be fired).</title>
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;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 document.getElementById('result').innerHTML = 'PASS: All events have bee n received as expected.'; 45 document.getElementById('result').innerHTML = 'PASS: All events have bee n received as expected.';
46 if (window.testRunner) 46 if (window.testRunner)
47 testRunner.notifyDone(); 47 testRunner.notifyDone();
48 } 48 }
49 } 49 }
50 50
51 function recordAnimationEnd() { 51 function recordAnimationEnd() {
52 endEventReceived = true; 52 endEventReceived = true;
53 document.getElementById('box').className = ''; 53 document.getElementById('box').className = '';
54 // Launch again the animation to catch the animation iteration events this time. 54 // Launch again the animation to catch the animation iteration events this time.
55 setTimeout(function () { 55 requestAnimationFrame(function () {
56 document.getElementById('box').style.animationIterationCount = "infinite "; 56 document.getElementById('box').style.animationIterationCount = "infinite ";
57 document.getElementById('box').className = 'animate'; 57 document.getElementById('box').className = 'animate';
58 }, 200); 58 });
59 } 59 }
60 </script> 60 </script>
61 </head> 61 </head>
62 <body> 62 <body>
63 Tests that unprefixed animation events are correctly fired when using html event listeners (only unprefixed should be fired). 63 Tests that unprefixed animation events are correctly fired when using html event listeners (only unprefixed should be fired).
64 <pre id="result">FAIL: No animation events received</pre> 64 <pre id="result">FAIL: No animation events received</pre>
65 <div id="box" onwebkitanimationstart="recordPrefixedEvent();" onwebkitanimatione nd="recordPrefixedEvent();" onwebkitanimationiteration="recordPrefixedEvent();" onanimationstart="recordAnimationStart();" onanimationend="recordAnimationEnd(); " onanimationiteration="recordAnimationIteration();" class="animate"></div> 65 <div id="box" onwebkitanimationstart="recordPrefixedEvent();" onwebkitanimatione nd="recordPrefixedEvent();" onwebkitanimationiteration="recordPrefixedEvent();" onanimationstart="recordAnimationStart();" onanimationend="recordAnimationEnd(); " onanimationiteration="recordAnimationIteration();" class="animate"></div>
66 </body> 66 </body>
67 </html> 67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698