| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 | 6 |
| 7 .box { | 7 .box { |
| 8 width: 100px; | 8 width: 100px; |
| 9 height: 100px; | 9 height: 100px; |
| 10 margin: 10px; | 10 margin: 10px; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 #two.changed { | 28 #two.changed { |
| 29 background-color: rgba(0, 0, 255, 1); | 29 background-color: rgba(0, 0, 255, 1); |
| 30 } | 30 } |
| 31 </style> | 31 </style> |
| 32 <script src="../animations/resources/animation-test-helpers.js"></script> | 32 <script src="../animations/resources/animation-test-helpers.js"></script> |
| 33 <script type="text/javascript"> | 33 <script type="text/javascript"> |
| 34 const expectedValues = [ | 34 const expectedValues = [ |
| 35 // [time, element-id, property, expected-value, tolerance] | 35 // [time, element-id, property, expected-value, tolerance] |
| 36 [0.5, 'one', 'background-color', [0, 127, 0], 2], | 36 [0.5, 'one', 'background-color', "rgba(0, 127, 0, 0.5)", 2], |
| 37 [0.5, 'two', 'background-color', [0, 0, 255], 2] | 37 [0.5, 'two', 'background-color', "rgba(0, 0, 255, 0.5)", 2] |
| 38 ]; | 38 ]; |
| 39 | 39 |
| 40 function setupTest() | 40 function setupTest() |
| 41 { | 41 { |
| 42 document.getElementById('one').className = 'box changed'; | 42 document.getElementById('one').className = 'box changed'; |
| 43 document.getElementById('two').className = 'box changed'; | 43 document.getElementById('two').className = 'box changed'; |
| 44 } | 44 } |
| 45 | 45 |
| 46 runTransitionTest(expectedValues, setupTest); | 46 runTransitionTest(expectedValues, setupTest); |
| 47 </script> | 47 </script> |
| 48 </head> | 48 </head> |
| 49 <body> | 49 <body> |
| 50 | 50 |
| 51 <div class="box" id="one"> | 51 <div class="box" id="one"> |
| 52 </div> | 52 </div> |
| 53 | 53 |
| 54 <div class="box" id="two"> | 54 <div class="box" id="two"> |
| 55 </div> | 55 </div> |
| 56 | 56 |
| 57 <div id="result"> | 57 <div id="result"> |
| 58 </div> | 58 </div> |
| 59 | 59 |
| 60 </body> | 60 </body> |
| 61 </html> | 61 </html> |
| OLD | NEW |