| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 "http://www.w3.org/TR/html4/loose.dtd"> |
| 3 |
| 4 <html lang="en"> |
| 5 <head> |
| 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 7 <title>Keyframes with invalid keys</title> |
| 8 <style type="text/css" media="screen"> |
| 9 @-webkit-keyframes "anim" { |
| 10 0, from { left: 100px; } |
| 11 fromto { left: 100px; } |
| 12 50% { left: 3px; } |
| 13 60%, unknown { left: 100px; } |
| 14 100 { left: 100px; } |
| 15 } |
| 16 #box { |
| 17 position: absolute; |
| 18 left: 3px; |
| 19 top: 100px; |
| 20 height: 100px; |
| 21 width: 100px; |
| 22 background-color: blue; |
| 23 -webkit-animation-duration: 1s; |
| 24 -webkit-animation-timing-function: linear; |
| 25 -webkit-animation-name: "anim"; |
| 26 } |
| 27 |
| 28 </style> |
| 29 <script src="resources/animation-test-helpers.js" type="text/javascript" cha
rset="utf-8"></script> |
| 30 <script type="text/javascript" charset="utf-8"> |
| 31 |
| 32 const expectedValues = [ |
| 33 // [animation-name, time, element-id, property, expected-value, tolerance] |
| 34 ["anim", 0.2, "box", "left", 3, 1], |
| 35 ["anim", 0.8, "box", "left", 3, 1], |
| 36 ]; |
| 37 |
| 38 runAnimationTest(expectedValues); |
| 39 |
| 40 </script> |
| 41 </head> |
| 42 <body> |
| 43 This test performs an animation of the left property. It should always remain 3p
x, unless there are |
| 44 errors during parsing, resulting in other values in keyframes with bad keys. |
| 45 Four of the keyframes contain invalid keys, and should be discarded altogether |
| 46 ("If a keyframe selector specifies negative percentage values or values higher t
han 100%, then the keyframe will be ignored", see <a href="http://www.w3.org/TR/
css3-animations/#keyframes">http://www.w3.org/TR/css3-animations/#keyframes</a>)
. |
| 47 <div id="box"> |
| 48 </div> |
| 49 <div id="result"> |
| 50 </div> |
| 51 </body> |
| 52 </html> |
| OLD | NEW |