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..90663f9e0ad79425ec9a13aa6982a9b0f9434efb |
--- /dev/null |
+++ b/LayoutTests/transitions/composited-with-hit-testing.html |
@@ -0,0 +1,38 @@ |
+<!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)'; |
+ // We can't use requestAnimationFrame to schedule here as that would |
+ // force timing updates to occur and avoid the crbug.com/501297 issue. |
+ setTimeout(function() { |
+ 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]; |
+ test.step(function() { |
+ assert_true(tx >= 500); |
+ }); |
+ test.done(); |
+ }); |
+ }, 500); |
+}); |
+ |
+setInterval(function() { |
+ document.elementFromPoint(50, 50); |
+}, 1); |
+</script> |