OLD | NEW |
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 Loading... |
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 |
OLD | NEW |