Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: LayoutTests/transitions/composited-with-hit-testing.html

Issue 1297563003: Transitions: Add layout test for hit-testing during composited transition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/virtual/threaded/transitions/composited-with-hit-testing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/virtual/threaded/transitions/composited-with-hit-testing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698