OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <html> |
| 3 <head> |
| 4 <style> |
| 5 #box { |
| 6 position: absolute; |
| 7 left: 0; |
| 8 top: 100px; |
| 9 height: 100px; |
| 10 width: 100px; |
| 11 background: red; |
| 12 -webkit-animation-duration: 1s; |
| 13 -webkit-animation-timing-function: linear; |
| 14 -webkit-animation-name: "anim"; |
| 15 } |
| 16 </style> |
| 17 <script src="../../../animations/resources/animation-test-helpers.js" type="text
/javascript" charset="utf-8"></script> |
| 18 </head> |
| 19 <body> |
| 20 <div> |
| 21 <style scoped> |
| 22 @-webkit-keyframes "anim" { |
| 23 from { left: 100px; } |
| 24 to { left: 100px; } |
| 25 } |
| 26 </style> |
| 27 <div> |
| 28 <style scoped> |
| 29 @-webkit-keyframes "anim" { |
| 30 from { left: 200px; } |
| 31 to { left: 200px; } |
| 32 } |
| 33 </style> |
| 34 <div id="d1"> |
| 35 <style scoped> |
| 36 @-webkit-keyframes "anim" { |
| 37 from { left: 300px; } |
| 38 to { left: 300px; } |
| 39 } |
| 40 </style> |
| 41 </div> |
| 42 </div> |
| 43 </div> |
| 44 <div id="result"> |
| 45 </div> |
| 46 <script> |
| 47 var d1 = document.querySelector("#d1"); |
| 48 var box = document.createElement('div'); |
| 49 box.id = "box"; |
| 50 d1.appendChild(box); |
| 51 |
| 52 const expectedValues = [ |
| 53 // [time, element-id, property, expected-value, tolerance] |
| 54 [0.5, "box", "left", 300, 0], |
| 55 ]; |
| 56 |
| 57 runAnimationTest(expectedValues); |
| 58 </script> |
| 59 </body> |
| 60 </html> |
OLD | NEW |