| OLD | NEW | 
|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 <style> | 2 <style> | 
| 3 #box { | 3 #box { | 
| 4     width: 10%; | 4     width: 10%; | 
| 5     height: 100px; | 5     height: 100px; | 
| 6     background-color: green; | 6     background-color: green; | 
| 7     -webkit-transition: all 1s linear; | 7     -webkit-transition: all 1s linear; | 
| 8 } | 8 } | 
| 9 | 9 | 
| 10 #box.final { | 10 #box.final { | 
| 11     width: 400px; | 11     width: 400px; | 
| 12     height: 90%; | 12     height: 90%; | 
| 13 } | 13 } | 
| 14 </style> | 14 </style> | 
| 15 Tests transitions to and from a mix of absolute and percent values | 15 Tests transitions to and from a mix of absolute and percent values | 
| 16 </p> | 16 </p> | 
| 17 <div style="width: 500px; height: 500px;"> | 17 <div style="width: 500px; height: 500px;"> | 
| 18   <div id="box"></div> | 18   <div id="box"></div> | 
| 19 </div> | 19 </div> | 
| 20 | 20 | 
| 21 <div id="result"> | 21 <div id="result"> | 
| 22 <script src="resources/transition-test-helpers.js"></script> | 22 <script src="../animations/resources/animation-test-helpers.js"></script> | 
| 23 <script type="text/javascript"> | 23 <script type="text/javascript"> | 
| 24 | 24 | 
| 25 const expectedValues = [ | 25 const expectedValues = [ | 
| 26   // [time, element-id, property, expected-value, tolerance] | 26   // [time, element-id, property, expected-value, tolerance] | 
| 27   // The transition takes 1 second, so we compute tolerance to allow | 27   // The transition takes 1 second, so we compute tolerance to allow | 
| 28   // 10% or 100ms variance, (endValue - startValue) / 10. | 28   // 10% or 100ms variance, (endValue - startValue) / 10. | 
| 29   [0.5, 'box', 'width', 225, 35], | 29   [0.5, 'box', 'width', 225, 35], | 
| 30   [0.5, 'box', 'height', 275, 35], | 30   [0.5, 'box', 'height', 275, 35], | 
| 31 ]; | 31 ]; | 
| 32 | 32 | 
| 33 function setupTest() | 33 function setupTest() | 
| 34 { | 34 { | 
| 35   var box = document.getElementById('box'); | 35   var box = document.getElementById('box'); | 
| 36   box.className = 'final'; | 36   box.className = 'final'; | 
| 37 } | 37 } | 
| 38 | 38 | 
| 39 runTransitionTest(expectedValues, setupTest, usePauseAPI); | 39 runTransitionTest(expectedValues, setupTest, usePauseAPI); | 
| 40 </script> | 40 </script> | 
| OLD | NEW | 
|---|