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 <style> | 4 <style> |
5 div { | 5 div { |
6 border-left-color: currentColor; | 6 border-left-color: currentColor; |
7 border-top-color: initial; | 7 border-top-color: initial; |
8 transition: 100s; | 8 transition: 100s; |
9 } | 9 } |
10 </style> | 10 </style> |
11 <div id="target1"></div> | 11 <div id="target1"></div> |
12 <div id="target2"></div> | 12 <div id="target2"></div> |
13 <script> | 13 <script> |
14 var test1 = async_test("A property set to currentColor shouldn't transition when
color changes"); | 14 var test1 = async_test("A property set to currentColor shouldn't transition when
color changes"); |
15 var test2 = async_test("A property set should transition from currentColor to an
explicit color"); | 15 var test2 = async_test("A property set should transition from currentColor to an
explicit color"); |
16 requestAnimationFrame(function() { | 16 requestAnimationFrame(function() { |
17 target1.style.color = "orange"; | 17 target1.style.color = "orange"; |
18 target2.style.borderLeftColor = "orange"; | 18 target2.style.borderLeftColor = "orange"; |
19 requestAnimationFrame(function() { | 19 requestAnimationFrame(function() { |
20 // Only 'color' should transition | 20 // Only 'color' should transition |
21 test1.step(function() { assert_equals(target1.getAnimationPlayers().length,
1); }); | 21 test1.step(function() { assert_equals(target1.getAnimations().length, 1); })
; |
22 test2.step(function() { assert_equals(target2.getAnimationPlayers().length,
1); }); | 22 test2.step(function() { assert_equals(target2.getAnimations().length, 1); })
; |
23 test1.done(); | 23 test1.done(); |
24 test2.done(); | 24 test2.done(); |
25 }); | 25 }); |
26 }); | 26 }); |
27 </script> | 27 </script> |
OLD | NEW |