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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/animation-events-unprefixed-02.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.</title> 4 <title>Tests that unprefixed animation events are correctly fired when using h tml event listeners.</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 29 matching lines...) Expand all
40 document.getElementById('result').innerHTML = 'PASS: All events have bee n received as expected.'; 40 document.getElementById('result').innerHTML = 'PASS: All events have bee n received as expected.';
41 if (window.testRunner) 41 if (window.testRunner)
42 testRunner.notifyDone(); 42 testRunner.notifyDone();
43 } 43 }
44 } 44 }
45 45
46 function recordAnimationEnd() { 46 function recordAnimationEnd() {
47 endEventReceived = true; 47 endEventReceived = true;
48 document.getElementById('box').className = ''; 48 document.getElementById('box').className = '';
49 // Launch again the animation to catch the animation iteration events this time. 49 // Launch again the animation to catch the animation iteration events this time.
50 setTimeout(function () { 50 requestAnimationFrame(function () {
51 document.getElementById('box').style.animationIterationCount = "infinite "; 51 document.getElementById('box').style.animationIterationCount = "infinite ";
52 document.getElementById('box').className = 'animate'; 52 document.getElementById('box').className = 'animate';
53 }, 200); 53 });
54 } 54 }
55 </script> 55 </script>
56 </head> 56 </head>
57 <body> 57 <body>
58 Tests that unprefixed animation events are correctly fired when using html event listeners. 58 Tests that unprefixed animation events are correctly fired when using html event listeners.
59 <pre id="result">FAIL: No animation events received</pre> 59 <pre id="result">FAIL: No animation events received</pre>
60 <div id="box" onanimationstart="recordAnimationStart();" onanimationend="recordA nimationEnd();" onanimationiteration="recordAnimationIteration();" class="animat e"></div> 60 <div id="box" onanimationstart="recordAnimationStart();" onanimationend="recordA nimationEnd();" onanimationiteration="recordAnimationIteration();" class="animat e"></div>
61 </body> 61 </body>
62 </html> 62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698