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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp

Issue 1738503003: Fix overlay scroll bar color on elements with dark background (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test after rebase Created 4 years, 10 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/platform/scroll/ScrollableAreaTest.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
index d89e693f05becf7c0b7bba1402c66045f8182314..4633bc4af8467013c9e5c4e428bab270a42f4ce9 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -4,6 +4,7 @@
#include "platform/scroll/ScrollableArea.h"
+#include "platform/graphics/Color.h"
#include "platform/graphics/GraphicsLayer.h"
#include "platform/scroll/ScrollbarTheme.h"
#include "platform/scroll/ScrollbarThemeMock.h"
@@ -280,4 +281,15 @@ TEST_F(ScrollableAreaTest, InvalidatesCompositedScrollbarsIfPartsNeedRepaint)
Heap::collectAllGarbage();
}
+TEST_F(ScrollableAreaTest, RecalculatesScrollbarOverlayIfBackgroundChanges)
+{
+ OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(IntPoint(0, 100));
+
+ EXPECT_EQ(ScrollbarOverlayStyleDefault, scrollableArea->getScrollbarOverlayStyle());
+ scrollableArea->recalculateScrollbarOverlayStyle(Color(34, 85, 51));
+ EXPECT_EQ(ScrollbarOverlayStyleLight, scrollableArea->getScrollbarOverlayStyle());
+ scrollableArea->recalculateScrollbarOverlayStyle(Color(236, 143, 185));
+ EXPECT_EQ(ScrollbarOverlayStyleDefault, scrollableArea->getScrollbarOverlayStyle());
+}
+
} // namespace blink
« 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