OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #t { |
| 6 width: 50px; |
| 7 height: 50px; |
| 8 transition: transform 250ms linear; |
| 9 background-color: green; |
| 10 } |
| 11 </style> |
| 12 <div id=t></div> |
| 13 <script> |
| 14 var test = async_test("Hit testing should not interrupt transition scheduling"); |
| 15 var counter = 0; |
| 16 requestAnimationFrame(function() { |
| 17 t.style.transform = 'translate(500px)'; |
| 18 // We can't use requestAnimationFrame to schedule here as that would |
| 19 // force timing updates to occur and avoid the crbug.com/501297 issue. |
| 20 setTimeout(function() { |
| 21 t.style.transitionDuration = '10000000s'; |
| 22 t.style.transform = 'translate(1000px)'; |
| 23 // The original transition should be long finished, the new one should |
| 24 // start from a translate-x greater than 500. |
| 25 requestAnimationFrame(function() { |
| 26 var tx = +/([\d.]+), [\d.]+\)/.exec(getComputedStyle(t).transform)[1]; |
| 27 test.step(function() { |
| 28 assert_true(tx >= 500); |
| 29 }); |
| 30 test.done(); |
| 31 }); |
| 32 }, 500); |
| 33 }); |
| 34 |
| 35 setInterval(function() { |
| 36 document.elementFromPoint(50, 50); |
| 37 }, 1); |
| 38 </script> |
OLD | NEW |