OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE> |
| 2 |
| 3 <html> |
| 4 <head> |
| 5 <style> |
| 6 .init { |
| 7 transition-duration: 1s; |
| 8 transition-timing-function: linear; |
| 9 } |
| 10 |
| 11 #x { |
| 12 transition-property: x; |
| 13 } |
| 14 #x.final { |
| 15 x: 200px; |
| 16 } |
| 17 |
| 18 #y { |
| 19 transition-property: y; |
| 20 } |
| 21 #y.final { |
| 22 y: 200px; |
| 23 } |
| 24 </style> |
| 25 <script src="../animations/resources/animation-test-helpers.js"></script> |
| 26 <script type="text/javascript"> |
| 27 |
| 28 const expectedValues = [ |
| 29 // [time, element-id, property, expected-value, tolerance] |
| 30 [0.5, 'x', 'x', 150, 20], |
| 31 [0.5, 'y', 'y', 150, 20], |
| 32 ]; |
| 33 |
| 34 function setupTest() |
| 35 { |
| 36 document.getElementById('x').setAttribute('class', 'init final'); |
| 37 document.getElementById('y').setAttribute('class', 'init final'); |
| 38 } |
| 39 |
| 40 runTransitionTest(expectedValues, setupTest); |
| 41 </script> |
| 42 </head> |
| 43 <body> |
| 44 <svg> |
| 45 <rect x="100" y="100" width="100" height="100" class="init" id="x"/> |
| 46 <rect x="100" y="100" width="100" height="100" class="init" id="y"/> |
| 47 </svg> |
| 48 |
| 49 <div id="result"> |
| 50 </div> |
| 51 |
| 52 </body> |
| 53 </html> |
OLD | NEW |