| Index: LayoutTests/transitions/interrupted-immediately.html
|
| diff --git a/LayoutTests/transitions/interrupted-all-transition.html b/LayoutTests/transitions/interrupted-immediately.html
|
| similarity index 58%
|
| copy from LayoutTests/transitions/interrupted-all-transition.html
|
| copy to LayoutTests/transitions/interrupted-immediately.html
|
| index 3c4e1ecd147312448ea753b53f526e1368a1ea97..a296824741af45b8aad8012b867f343e6d323634 100644
|
| --- a/LayoutTests/transitions/interrupted-all-transition.html
|
| +++ b/LayoutTests/transitions/interrupted-immediately.html
|
| @@ -25,28 +25,33 @@
|
| testRunner.waitUntilDone();
|
| }
|
|
|
| + var id;
|
| +
|
| function startTransition()
|
| {
|
| var box = document.getElementById('box');
|
| +
|
| box.style.left = '300px';
|
| - box.style.opacity = 0.5;
|
| - window.setTimeout(function() {
|
| - box.style.left = '0px';
|
| -
|
| - window.setTimeout(function() {
|
| - var boxPos = parseInt(window.getComputedStyle(box).left);
|
| - document.getElementById('result').innerHTML = (boxPos < 200) ? "PASS" : "FAIL";
|
| - if (window.testRunner)
|
| - testRunner.notifyDone();
|
| - }, 250);
|
| - }, 500);
|
| + box.offsetTop; // force transition start
|
| +
|
| + box.style.left = '0px'
|
| + box.offsetTop; // force transition interruption
|
| +
|
| + // Force at least one timing update and recalc after the interruption.
|
| + id = requestAnimationFrame(function() {
|
| + cancelAnimationFrame(id);
|
| + var current = internals.numberOfActiveAnimations();
|
| + document.getElementById('result').innerHTML = (current == 0) ? "PASS" : "FAIL";
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + });
|
| }
|
| window.addEventListener('load', startTransition, false)
|
| </script>
|
| </head>
|
| <body>
|
|
|
| -<p>Box should start moving left after left style is reset after 500ms</p>
|
| +<p>Box should stay left as style is reset immediately</p>
|
| <div id="container">
|
| <div id="box">
|
| </div>
|
|
|