diff options
author | skobes@chromium.org <skobes@chromium.org> | 2015-03-18 18:20:13 +0000 |
---|---|---|
committer | skobes@chromium.org <skobes@chromium.org> | 2015-03-18 18:20:13 +0000 |
commit | cedbd38e27cc8f39913568f4f16a1b7ad4bb9fd0 (patch) | |
tree | 551a93f17b7d87d267856d58fd5b1967daba468f /third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html | |
parent | 628174f6663054a3ad8fea5830c29fcdf693aad7 (diff) | |
download | chromium_src-cedbd38e27cc8f39913568f4f16a1b7ad4bb9fd0.zip chromium_src-cedbd38e27cc8f39913568f4f16a1b7ad4bb9fd0.tar.gz chromium_src-cedbd38e27cc8f39913568f4f16a1b7ad4bb9fd0.tar.bz2 |
Fix timeout of overflow-scroll-animates.html in virtual/threaded.
When threaded compositing is enabled, the effect of adding or removing a
scroll listener does not happen until the next frame. To compensate for this,
the test now waits before triggering input with eventSender.
BUG=458420,575
Review URL: https://codereview.chromium.org/1006423007
git-svn-id: svn://svn.chromium.org/blink/trunk@192111 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html')
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html index a88a2b7..3d960ed 100644 --- a/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html +++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/overflow-scroll-animates.html @@ -8,8 +8,8 @@ } #content { - width: 7500px; - height: 7500px; + width: 750px; + height: 750px; background-color: blue; } @@ -39,16 +39,19 @@ function nextConfig() { element.addEventListener("scroll", onElementScroll); - eventSender.mouseMoveTo(100, 100); - eventSender.mouseScrollBy(0, -2, /* paged */ false, - config.preciseDeltas); - scrollStart = performance.now(); + testRunner.displayAsyncThen(function() { + eventSender.mouseMoveTo(100, 100); + eventSender.mouseScrollBy(0, -2, /* paged */ false, + config.preciseDeltas); + scrollStart = performance.now(); + }); } function reset() { element.removeEventListener("scroll", onElementScroll); element.scrollTop = 0; waitingForScroll = false; + scrollStart = undefined; } function onElementScroll() { @@ -59,6 +62,8 @@ function onElementScroll() { reset(); nextConfig(); } + } else if (!scrollStart) { + return; } else if (config.expectSmooth) { shouldNotBe("element.scrollTop", "80"); waitingForScroll = true; |