| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 #child { | 3 #child { |
| 4 width: 50px; | 4 width: 50px; |
| 5 height: 50px; | 5 height: 50px; |
| 6 background: red; | 6 background: red; |
| 7 -webkit-animation: flash 0.2s infinite; | 7 animation: flash 0.2s infinite; |
| 8 } | 8 } |
| 9 | 9 |
| 10 .hideMe { | 10 .hideMe { |
| 11 display: none; | 11 display: none; |
| 12 } | 12 } |
| 13 | 13 |
| 14 @-webkit-keyframes flash { | 14 @keyframes flash { |
| 15 0% { | 15 0% { |
| 16 opacity: 1; | 16 opacity: 1; |
| 17 } | 17 } |
| 18 100% { | 18 100% { |
| 19 opacity: 0; | 19 opacity: 0; |
| 20 } | 20 } |
| 21 } | 21 } |
| 22 </style> | 22 </style> |
| 23 <div id='container'> | 23 <div id='container'> |
| 24 <div id='child' class='hideMe'></div> | 24 <div id='child' class='hideMe'></div> |
| 25 </div> | 25 </div> |
| 26 <script> | 26 <script> |
| 27 if (window.testRunner) { | 27 if (window.testRunner) { |
| 28 testRunner.waitUntilDone(); | 28 testRunner.waitUntilDone(); |
| 29 testRunner.dumpAsText(); | 29 testRunner.dumpAsText(); |
| 30 } | 30 } |
| 31 var firstCall = true; | 31 var firstCall = true; |
| 32 child.addEventListener('webkitAnimationStart', function(e) { | 32 child.addEventListener('animationstart', function(e) { |
| 33 if (firstCall) { | 33 if (firstCall) { |
| 34 container.classList.add('hideMe'); | 34 container.classList.add('hideMe'); |
| 35 container.offsetTop; | 35 container.offsetTop; |
| 36 container.classList.remove('hideMe'); | 36 container.classList.remove('hideMe'); |
| 37 firstCall = false; | 37 firstCall = false; |
| 38 return; | 38 return; |
| 39 } | 39 } |
| 40 document.documentElement.textContent = 'PASS'; | 40 document.documentElement.textContent = 'PASS'; |
| 41 if (window.testRunner) { | 41 if (window.testRunner) { |
| 42 testRunner.notifyDone(); | 42 testRunner.notifyDone(); |
| 43 } | 43 } |
| 44 }); | 44 }); |
| 45 child.classList.remove('hideMe'); | 45 child.classList.remove('hideMe'); |
| 46 </script> | 46 </script> |
| 47 | 47 |
| OLD | NEW |