| <!DOCTYPE html> | |
| <!-- | |
| | Test case which ensures that simple use of transitions works correctly and | |
| | that we see the right thing at the right time. | |
| --> | |
| <html> | |
| <head> | |
| <style> | |
| #block { | |
| width: 100px; | |
| height: 100px; | |
| background-color: red; | |
| font-size: 30px; | |
| transition: background-color 1s, transform 2s linear; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="block"></div> | |
| <script> | |
| if (window.testRunner) { | |
| window.testRunner.waitUntilDone(); | |
| } | |
| var blockDiv = document.getElementById('block'); | |
| window.addEventListener('load', function() { | |
| if (window.testRunner) { | |
| // Do a layout upon the load event so that we setup our source styles | |
| // that we will be transitioning from. | |
| window.testRunner.DoNonMeasuredLayout(); | |
| } | |
| blockDiv.style.backgroundColor = 'blue'; | |
| blockDiv.style.transform = "translate(100px, 0)"; | |
| if (window.testRunner) { | |
| // Do another layout to start the transitions. | |
| window.testRunner.DoNonMeasuredLayout(); | |
| // Run the transition to the half-way point and then measure the result. | |
| window.testRunner.AdvanceClockByMs(500); | |
| window.testRunner.notifyDone(); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |