| |
| <html> |
| <head> |
| <style> |
| #target { |
| position: relative; |
| left: 0px; |
| height: 50px; |
| width: 50px; |
| background-color: green; |
| -webkit-transition: left 4s linear 1s; |
| } |
| |
| #target.moved { |
| left: 400px; |
| } |
| </style> |
| <script src="resources/transition-test-helpers.js"></script> |
| <script> |
| const expectedValues = [ |
| // [time, element-id, property, expected-value, tolerance] |
| [2, "target", "left", 100, 4], |
| ]; |
| |
| function setupTest() |
| { |
| document.getElementById("target").className = "moved"; |
| } |
| |
| runTransitionTest(expectedValues, setupTest, usePauseAPI); |
| </script> |
| </head> |
| <body> |
| <div id="target"></div> |
| <div id="result"></div> |
| </body> |
| </html> |