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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableAreaTest.cpp

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: fix test Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/scroll/ScrollableArea.h" 5 #include "platform/scroll/ScrollableArea.h"
6 6
7 #include "platform/graphics/Color.h" 7 #include "platform/graphics/Color.h"
8 #include "platform/graphics/GraphicsLayer.h" 8 #include "platform/graphics/GraphicsLayer.h"
9 #include "platform/scroll/ScrollbarTestSuite.h" 9 #include "platform/scroll/ScrollbarTestSuite.h"
10 #include "platform/scroll/ScrollbarTheme.h" 10 #include "platform/scroll/ScrollbarTheme.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 EXPECT_FALSE(verticalScrollbar->thumbNeedsRepaint()); 218 EXPECT_FALSE(verticalScrollbar->thumbNeedsRepaint());
219 219
220 // Forced GC in order to finalize objects depending on the mock object. 220 // Forced GC in order to finalize objects depending on the mock object.
221 ThreadState::current()->collectAllGarbage(); 221 ThreadState::current()->collectAllGarbage();
222 } 222 }
223 223
224 TEST_F(ScrollableAreaTest, RecalculatesScrollbarOverlayIfBackgroundChanges) { 224 TEST_F(ScrollableAreaTest, RecalculatesScrollbarOverlayIfBackgroundChanges) {
225 MockScrollableArea* scrollableArea = 225 MockScrollableArea* scrollableArea =
226 MockScrollableArea::create(ScrollOffset(0, 100)); 226 MockScrollableArea::create(ScrollOffset(0, 100));
227 227
228 EXPECT_EQ(ScrollbarOverlayStyleDefault, 228 EXPECT_EQ(ScrollbarOverlayColorThemeDark,
229 scrollableArea->getScrollbarOverlayStyle()); 229 scrollableArea->getScrollbarOverlayColorTheme());
230 scrollableArea->recalculateScrollbarOverlayStyle(Color(34, 85, 51)); 230 scrollableArea->recalculateScrollbarOverlayColorTheme(Color(34, 85, 51));
231 EXPECT_EQ(ScrollbarOverlayStyleLight, 231 EXPECT_EQ(ScrollbarOverlayColorThemeLight,
232 scrollableArea->getScrollbarOverlayStyle()); 232 scrollableArea->getScrollbarOverlayColorTheme());
233 scrollableArea->recalculateScrollbarOverlayStyle(Color(236, 143, 185)); 233 scrollableArea->recalculateScrollbarOverlayColorTheme(Color(236, 143, 185));
234 EXPECT_EQ(ScrollbarOverlayStyleDefault, 234 EXPECT_EQ(ScrollbarOverlayColorThemeDark,
235 scrollableArea->getScrollbarOverlayStyle()); 235 scrollableArea->getScrollbarOverlayColorTheme());
236 } 236 }
237 237
238 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp ('k') | third_party/WebKit/Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698