Commit b455cba7 authored by Lutz Justen's avatar Lutz Justen Committed by Commit Bot

Fix ScrollAnimatorSimTest on tsan

Increases the begin frame delay in ScrollAnimatorSimTest. This works
around an issue where ScrollAnimatorSimTest.TestDivUserScrollCallBack
was consistently broken on tsan, presumably because it took too long on
this heavily instrumented build.

TBR=lanwei@chromium.org,bokan@chromium.org

BUG=chromium:987981
TEST=Repro steps mentioned in #5 of bug don't work anymore.

Change-Id: Iad1205cd0ad8bacc5c6ce618c23a8ae27d706c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724685Reviewed-by: default avatarLutz Justen <ljusten@chromium.org>
Commit-Queue: Lutz Justen <ljusten@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682297}
parent bf103f9e
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
namespace blink { namespace blink {
namespace {
constexpr double kBeginFrameDelaySeconds = 0.5;
}
class FractionalScrollSimTest : public SimTest { class FractionalScrollSimTest : public SimTest {
public: public:
FractionalScrollSimTest() : fractional_scroll_offsets_for_test_(true) {} FractionalScrollSimTest() : fractional_scroll_offsets_for_test_(true) {}
...@@ -109,7 +113,7 @@ TEST_F(ScrollAnimatorSimTest, TestRootFrameLayoutViewportUserScrollCallBack) { ...@@ -109,7 +113,7 @@ TEST_F(ScrollAnimatorSimTest, TestRootFrameLayoutViewportUserScrollCallBack) {
// The callback is executed when the animation finishes at // The callback is executed when the animation finishes at
// ScrollAnimator::TickAnimation. // ScrollAnimator::TickAnimation.
Compositor().BeginFrame(); Compositor().BeginFrame();
Compositor().BeginFrame(0.3); Compositor().BeginFrame(kBeginFrameDelaySeconds);
ASSERT_TRUE(finished); ASSERT_TRUE(finished);
} }
...@@ -151,7 +155,7 @@ TEST_F(ScrollAnimatorSimTest, TestRootFrameVisualViewporUserScrollCallBack) { ...@@ -151,7 +155,7 @@ TEST_F(ScrollAnimatorSimTest, TestRootFrameVisualViewporUserScrollCallBack) {
// The callback is executed when the animation finishes at // The callback is executed when the animation finishes at
// ScrollAnimator::TickAnimation. // ScrollAnimator::TickAnimation.
Compositor().BeginFrame(); Compositor().BeginFrame();
Compositor().BeginFrame(0.3); Compositor().BeginFrame(kBeginFrameDelaySeconds);
ASSERT_TRUE(finished); ASSERT_TRUE(finished);
} }
...@@ -193,7 +197,7 @@ TEST_F(ScrollAnimatorSimTest, TestRootFrameBothViewporsUserScrollCallBack) { ...@@ -193,7 +197,7 @@ TEST_F(ScrollAnimatorSimTest, TestRootFrameBothViewporsUserScrollCallBack) {
// The callback is executed when the animation finishes at // The callback is executed when the animation finishes at
// ScrollAnimator::TickAnimation. // ScrollAnimator::TickAnimation.
Compositor().BeginFrame(); Compositor().BeginFrame();
Compositor().BeginFrame(0.3); Compositor().BeginFrame(kBeginFrameDelaySeconds);
ASSERT_TRUE(finished); ASSERT_TRUE(finished);
} }
...@@ -241,7 +245,7 @@ TEST_F(ScrollAnimatorSimTest, TestDivUserScrollCallBack) { ...@@ -241,7 +245,7 @@ TEST_F(ScrollAnimatorSimTest, TestDivUserScrollCallBack) {
// The callback is executed when the animation finishes at // The callback is executed when the animation finishes at
// ScrollAnimator::TickAnimation. // ScrollAnimator::TickAnimation.
Compositor().BeginFrame(0.3); Compositor().BeginFrame(kBeginFrameDelaySeconds);
ASSERT_TRUE(finished); ASSERT_TRUE(finished);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment