| Index: third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp b/third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp
|
| index 6b8aef9abd016c5c9cabf0a004b6924ee1ea9488..0840b477cb6af9be15636738c470cb98771d5b99 100644
|
| --- a/third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp
|
| @@ -105,6 +105,35 @@ TEST_F(ScrollbarsTest, CustomScrollbarsCauseLayoutOnExistenceChange) {
|
| ASSERT_FALSE(layout_viewport->HorizontalScrollbar());
|
| }
|
|
|
| +TEST_F(ScrollbarsTest, TransparentBackgroundUsesDarkOverlayColorTheme) {
|
| + // The bug reproduces only with RLS off. When RLS ships we can keep the test
|
| + // but remove this setting.
|
| + ScopedRootLayerScrollingForTest turn_off_root_layer_scrolling(false);
|
| +
|
| + // This test is specifically checking the behavior when overlay scrollbars
|
| + // are enabled.
|
| + DCHECK(ScrollbarTheme::GetTheme().UsesOverlayScrollbars());
|
| +
|
| + WebView().Resize(WebSize(800, 600));
|
| + WebView().SetBaseBackgroundColorOverride(SK_ColorTRANSPARENT);
|
| + SimRequest request("https://example.com/test.html", "text/html");
|
| + LoadURL("https://example.com/test.html");
|
| + request.Complete(
|
| + "<!DOCTYPE html>"
|
| + "<style>"
|
| + " body{"
|
| + " height: 300%;"
|
| + " }"
|
| + "</style>");
|
| + Compositor().BeginFrame();
|
| +
|
| + ScrollableArea* layout_viewport =
|
| + GetDocument().View()->LayoutViewportScrollableArea();
|
| +
|
| + EXPECT_EQ(kScrollbarOverlayColorThemeDark,
|
| + layout_viewport->GetScrollbarOverlayColorTheme());
|
| +}
|
| +
|
| typedef bool TestParamOverlayScrollbar;
|
| class ScrollbarAppearanceTest
|
| : public SimTest,
|
|
|