| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html lang="en"> | |
| 3 <head> | |
| 4 <title>Keyframes test</title> | |
| 5 <style type="text/css" media="screen"> | |
| 6 #box { | |
| 7 position: absolute; | |
| 8 left: 0; | |
| 9 top: 100px; | |
| 10 height: 100px; | |
| 11 width: 100px; | |
| 12 background-color: blue; | |
| 13 animation-duration: 1s; | |
| 14 animation-timing-function: linear; | |
| 15 animation-name: anim; | |
| 16 animation-fill-mode: forwards; | |
| 17 } | |
| 18 </style> | |
| 19 <script src="resources/animation-test-helpers.js" type="text/javascript" cha
rset="utf-8"></script> | |
| 20 <script type="text/javascript" charset="utf-8"> | |
| 21 | |
| 22 const expectedValues = [ | |
| 23 // [time, element-id, property, expected-value, tolerance] | |
| 24 [1, "box", "left", 300, 1], | |
| 25 ]; | |
| 26 var lastSheet = document.styleSheets[document.styleSheets.length - 1]; | |
| 27 lastSheet.insertRule("@-webkit-keyframes anim { from { left: 200px; } to { l
eft: 300px;} }", lastSheet.cssRules.length); | |
| 28 runAnimationTest(expectedValues); | |
| 29 result += lastSheet.cssRules[lastSheet.cssRules.length - 1].cssText; | |
| 30 result += '<br>'; | |
| 31 | |
| 32 </script> | |
| 33 </head> | |
| 34 <body> | |
| 35 This test creates dynamically a prefixed @-webkit-keyframes and verify the outpu
t. | |
| 36 <div id="box"> | |
| 37 </div> | |
| 38 <div id="result"> | |
| 39 </div> | |
| 40 </body> | |
| 41 </html> | |
| OLD | NEW |