Chromium Code Reviews| Index: LayoutTests/transitions/composited-with-hit-testing.html |
| diff --git a/LayoutTests/transitions/composited-with-hit-testing.html b/LayoutTests/transitions/composited-with-hit-testing.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..27372ddacbcc676aaa19437faf501f3a7211066d |
| --- /dev/null |
| +++ b/LayoutTests/transitions/composited-with-hit-testing.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<script src="../resources/testharness.js"></script> |
| +<script src="../resources/testharnessreport.js"></script> |
| +<style> |
| +#t { |
| + width: 50px; |
| + height: 50px; |
| + transition: transform 250ms linear; |
| + background-color: green; |
| +} |
| +</style> |
| +<div id=t></div> |
| +<script> |
| +var test = async_test("Hit testing should not interrupt transition scheduling"); |
| +var counter = 0; |
| +requestAnimationFrame(function() { |
| + t.style.transform = 'translate(500px)'; |
| + setTimeout(function() { |
|
alancutter (OOO until 2018)
2015/08/18 03:09:16
Add comment explaining why setTimeout is necessary
|
| + t.style.transitionDuration = '10000000s'; |
| + t.style.transform = 'translate(1000px)'; |
| + // The original transition should be long finished, the new one should |
| + // start from a translate-x greater than 500. |
| + requestAnimationFrame(function() { |
| + var tx = +/([\d.]+), [\d.]+\)/.exec(getComputedStyle(t).transform)[1]; |
|
alancutter (OOO until 2018)
2015/08/18 03:09:16
If you use the translate property this can be made
|
| + test.step(function() { |
| + assert_true(tx >= 500); |
| + }); |
| + test.done(); |
| + }); |
| + }, 500); |
| +}); |
| + |
| +setInterval(function() { |
| + document.elementFromPoint(50, 50); |
| +}, 1); |
| +</script> |