Commit 50af2a9f authored by David Bokan's avatar David Bokan Committed by Commit Bot

More diagnostic ASSERTS for flaky scrollbar test

I added ASSERTs to this test in r505630 but none of them tripped and the
test is still flaky. I've replaced the ASSERTS with a new set.

Bug: 769350
Change-Id: Ib4f3819de8e01e346fb1e882fe17b1811e0a30bb
Reviewed-on: https://chromium-review.googlesource.com/698266Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506378}
parent 834f9a32
...@@ -1131,26 +1131,16 @@ TEST_P(ScrollbarAppearanceTest, HugeScrollingThumbPosition) { ...@@ -1131,26 +1131,16 @@ TEST_P(ScrollbarAppearanceTest, HugeScrollingThumbPosition) {
Scrollbar* scrollbar = scrollable_area->VerticalScrollbar(); Scrollbar* scrollbar = scrollable_area->VerticalScrollbar();
ASSERT_TRUE(scrollbar); ASSERT_TRUE(scrollbar);
// TODO(bokan): Added a bunch of asserting here to fish out a flake. I // TODO(bokan): Added a bunch of sanity checks here fish out a flake.
// suspect we're sometimes either keeping a horizontal scrollbar around a bit // Remove once this bug is closed: crbug.com/769350.
// too long or the mock theme hasn't yet taken effect. Not sure how that might
// be happening but these should help decide where to look next (or the newly
// added BeginFrame after setting the ScrollOffset will help. In any case,
// remove once this bug is closed: crbug.com/769350.
{ {
ASSERT_FALSE(scrollable_area->HorizontalScrollbar()); ScrollbarTheme& theme = scrollbar->GetTheme();
WebThemeEngine* engine = Platform::Current()->ThemeEngine(); EXPECT_TRUE(&theme == &ScrollbarTheme::GetTheme());
ASSERT_EQ( EXPECT_EQ(10000000, scrollbar->TotalSize());
engine->GetSize(StubWebThemeEngine::kPartScrollbarVerticalThumb).width, EXPECT_EQ(1000, scrollbar->VisibleSize());
15); EXPECT_EQ(9999000, scrollbar->CurrentPos());
ASSERT_EQ( EXPECT_EQ(1000, theme.TrackLength(*scrollbar));
engine->GetSize(StubWebThemeEngine::kPartScrollbarVerticalThumb).height, EXPECT_EQ(52, theme.ThumbLength(*scrollbar));
StubWebThemeEngine::kMinimumVerticalLength);
StubWebThemeEngine::ScrollbarStyle style;
engine->GetOverlayScrollbarStyle(&style);
ASSERT_EQ(style.thumb_thickness, 3);
ASSERT_EQ(style.scrollbar_margin, 0);
} }
int maximumThumbPosition = int maximumThumbPosition =
......
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