OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
4 <div id="target"></div> | 4 <div id="target"></div> |
5 <script> | 5 <script> |
6 test(() => { | 6 test(() => { |
7 var firstAnimation = target.animate([{visibility: 'hidden'}, {visibility: 'vis
ible'}], 1); | 7 var firstAnimation = target.animate([{visibility: 'hidden'}, {visibility: 'vis
ible'}], 1); |
8 var secondAnimation = target.animate({visibility: 'collapse'}, 1); | 8 var secondAnimation = target.animate({visibility: 'collapse'}, 1); |
9 firstAnimation.pause(); | 9 firstAnimation.pause(); |
10 firstAnimation.currentTime = 0; | 10 firstAnimation.currentTime = 0; |
11 secondAnimation.pause(); | 11 secondAnimation.pause(); |
12 secondAnimation.currentTime = 0.75; | 12 secondAnimation.currentTime = 0.75; |
13 assert_equals(getComputedStyle(target).visibility, 'collapse'); | 13 assert_equals(getComputedStyle(target).visibility, 'collapse'); |
14 firstAnimation.currentTime = 0.1; | 14 firstAnimation.currentTime = 0.1; |
15 assert_equals(getComputedStyle(target).visibility, 'visible'); | 15 assert_equals(getComputedStyle(target).visibility, 'visible'); |
16 }, "Visibility animations with neutral keyframes should be responsive to animati
ons they're stacked on top of."); | 16 }, "Visibility animations with neutral keyframes should be responsive to animati
ons they're stacked on top of."); |
17 </script> | 17 </script> |
OLD | NEW |