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

Unified Diff: third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp

Issue 2851853003: Use dark scrollbar theme for transparent frames. (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698