| <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> |
| |
| <html> |
| <head> |
| <style> |
| .box { |
| display: inline-block; |
| height: 100px; |
| width: 100px; |
| margin: 20px; |
| border: 3px solid blue; |
| -webkit-transition-duration: 0.5s; |
| -webkit-transition-timing-function: linear; |
| -webkit-transition-property: box-shadow; |
| } |
| |
| .final #none-to-normal { |
| box-shadow: 20px 20px 10px black; |
| } |
| |
| .final #none-to-inset { |
| box-shadow: 20px 20px 10px black inset; |
| } |
| |
| #inset-to-normal { |
| box-shadow: 20px 20px 10px black inset; |
| } |
| |
| .final #inset-to-normal { |
| box-shadow: 20px 20px 10px black; |
| } |
| |
| #normal-to-inset { |
| box-shadow: 20px 20px 10px black; |
| } |
| |
| .final #normal-to-inset { |
| box-shadow: 20px 20px 10px black inset; |
| } |
| |
| </style> |
| <script src="resources/transition-test-helpers.js"></script> |
| <script type="text/javascript"> |
| |
| const expectedValues = [ |
| // [time, element-id, property, expected-value, tolerance] |
| // For box-shadow, we test shadow-x and shadow-y to see if it's animating. |
| [0.25, 'none-to-normal', 'box-shadow', [10, 10], 1], |
| [0.25, 'none-to-inset', 'box-shadow', [10, 10], 1], |
| [0.25, 'inset-to-normal', 'box-shadow', [20, 20], 1], |
| [0.25, 'normal-to-inset', 'box-shadow', [20, 20], 1], |
| ]; |
| |
| function setupTest() |
| { |
| document.body.className = 'final'; |
| } |
| |
| runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| </script> |
| </head> |
| <body> |
| |
| <div id="none-to-normal" class="box"></div> |
| <div id="none-to-inset" class="box"></div> |
| <div id="inset-to-normal" class="box"></div> |
| <div id="normal-to-inset" class="box"></div> |
| |
| <div id="result"> |
| </div> |
| |
| </body> |
| </html> |