| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <html> | |
| 4 <head> | |
| 5 <style type="text/css" media="screen"> | |
| 6 .box { | |
| 7 position: relative; | |
| 8 width: 100px; | |
| 9 height: 100px; | |
| 10 background: blue; | |
| 11 -webkit-animation: boxAnimation 0.1s 0.1s linear; | |
| 12 } | |
| 13 | |
| 14 .box::first-letter { | |
| 15 color: black; | |
| 16 -webkit-animation: firstLetterAnimation 0.1s 0.2s forwards ease-out; | |
| 17 } | |
| 18 | |
| 19 @-webkit-keyframes firstLetterAnimation { | |
| 20 from { font-size: 24pt;} | |
| 21 to { font-size: 40pt;} | |
| 22 } | |
| 23 | |
| 24 @-webkit-keyframes boxAnimation { | |
| 25 from { | |
| 26 font-size: 40pt; | |
| 27 -webkit-transform: rotate(0deg); | |
| 28 } | |
| 29 to { | |
| 30 font-size: 2pt; | |
| 31 -webkit-transform: rotate(360deg); | |
| 32 } | |
| 33 } | |
| 34 | |
| 35 </style> | |
| 36 <script type="text/javascript" charset="utf-8"> | |
| 37 if (window.layoutTestController) { | |
| 38 layoutTestController.dumpAsText(); | |
| 39 layoutTestController.waitUntilDone(); | |
| 40 } | |
| 41 | |
| 42 var result = "Animations test result: <br><br>"; | |
| 43 var animations = 0; | |
| 44 function animationEnded(event) | |
| 45 { | |
| 46 if ((event.animationName == "firstLetterAnimation" || event.animationNam
e == "boxAnimation") && | |
| 47 parseFloat(event.elapsedTime).toFixed(2) == 0.1) | |
| 48 result += "PASS<br>"; | |
| 49 else | |
| 50 result += "FAIL<br>"; | |
| 51 | |
| 52 ++animations; | |
| 53 if (animations == 2) { | |
| 54 document.getElementById('result').innerHTML = result; | |
| 55 if (window.layoutTestController) | |
| 56 layoutTestController.notifyDone(); | |
| 57 } | |
| 58 } | |
| 59 | |
| 60 window.addEventListener("webkitAnimationEnd", animationEnded, false ); | |
| 61 </script> | |
| 62 </head> | |
| 63 <body> | |
| 64 <div class="box"> | |
| 65 Lorem ipsum dolor sit amet. | |
| 66 </div> | |
| 67 <div id="result" style="position:absolute; top:150px"> | |
| 68 </div> | |
| 69 </body> | |
| 70 </html> | |
| OLD | NEW |