| OLD | NEW |
| (Empty) | |
| 1 <script src="../resources/testharness.js"></script> |
| 2 <script src="../resources/testharnessreport.js"></script> |
| 3 <body></body> |
| 4 <script> |
| 5 function createTarget() { |
| 6 var target = document.createElement('div'); |
| 7 document.body.appendChild(target); |
| 8 return target; |
| 9 } |
| 10 |
| 11 test(() => { |
| 12 var target = createTarget(); |
| 13 target.style.left = '100px'; |
| 14 assert_equals(getComputedStyle(target).left, '100px'); |
| 15 target.style.transition = 'left 1s -0.5s, left 1s -0.25s linear'; |
| 16 target.style.left = '200px'; |
| 17 assert_equals(getComputedStyle(target).left, '125px'); |
| 18 target.remove(); |
| 19 }, 'The last timing properties for a transition property should be used'); |
| 20 |
| 21 test(() => { |
| 22 var target = createTarget(); |
| 23 target.style.left = '100px'; |
| 24 assert_equals(getComputedStyle(target).left, '100px'); |
| 25 target.style.transition = 'left 1s -0.5s, all 1s -0.25s linear'; |
| 26 target.style.left = '200px'; |
| 27 assert_equals(getComputedStyle(target).left, '125px'); |
| 28 target.remove(); |
| 29 }, 'The last timing properties for a transition property should be used includin
g shorthand references to the property'); |
| 30 |
| 31 test(() => { |
| 32 var target = createTarget(); |
| 33 target.style.left = '100px'; |
| 34 assert_equals(getComputedStyle(target).left, '100px'); |
| 35 target.style.transition = 'left 1s -0.5s, left 0s'; |
| 36 target.style.left = '200px'; |
| 37 assert_equals(getComputedStyle(target).left, '200px'); |
| 38 target.remove(); |
| 39 }, 'The last timing properties for a transition property should be used even if
they cause the transition to not start'); |
| 40 </script> |
| OLD | NEW |