| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ScrollbarThemeOverlay.h" | 5 #include "platform/scroll/ScrollbarThemeOverlay.h" | 
| 6 | 6 | 
| 7 #include "platform/scroll/ScrollbarTestSuite.h" | 7 #include "platform/scroll/ScrollbarTestSuite.h" | 
| 8 #include "platform/testing/TestingPlatformSupport.h" | 8 #include "platform/testing/TestingPlatformSupport.h" | 
| 9 | 9 | 
| 10 namespace blink { | 10 namespace blink { | 
| 11 | 11 | 
| 12 using testing::NiceMock; | 12 using ::testing::NiceMock; | 
| 13 using testing::Return; | 13 using ::testing::Return; | 
| 14 | 14 | 
| 15 using ScrollbarThemeOverlayTest = testing::Test; | 15 using ScrollbarThemeOverlayTest = ::testing::Test; | 
| 16 | 16 | 
| 17 TEST_F(ScrollbarThemeOverlayTest, PaintInvalidation) { | 17 TEST_F(ScrollbarThemeOverlayTest, PaintInvalidation) { | 
| 18   ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler> | 18   ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler> | 
| 19       platform; | 19       platform; | 
| 20 | 20 | 
| 21   NiceMock<MockScrollableArea>* mock_scrollable_area = | 21   NiceMock<MockScrollableArea>* mock_scrollable_area = | 
| 22       new NiceMock<MockScrollableArea>(ScrollOffset(100, 100)); | 22       new NiceMock<MockScrollableArea>(ScrollOffset(100, 100)); | 
| 23   ScrollbarThemeOverlay theme(14, 0, ScrollbarThemeOverlay::kAllowHitTest); | 23   ScrollbarThemeOverlay theme(14, 0, ScrollbarThemeOverlay::kAllowHitTest); | 
| 24 | 24 | 
| 25   Scrollbar* vertical_scrollbar = Scrollbar::CreateForTesting( | 25   Scrollbar* vertical_scrollbar = Scrollbar::CreateForTesting( | 
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 131   EXPECT_CALL(*mock_scrollable_area, ScrollbarsHidden()) | 131   EXPECT_CALL(*mock_scrollable_area, ScrollbarsHidden()) | 
| 132       .WillOnce(Return(false)); | 132       .WillOnce(Return(false)); | 
| 133   vertical_scrollbar->SetEnabled(true); | 133   vertical_scrollbar->SetEnabled(true); | 
| 134   EXPECT_TRUE(vertical_scrollbar->ThumbNeedsRepaint()); | 134   EXPECT_TRUE(vertical_scrollbar->ThumbNeedsRepaint()); | 
| 135   EXPECT_TRUE(mock_scrollable_area->VerticalScrollbarNeedsPaintInvalidation()); | 135   EXPECT_TRUE(mock_scrollable_area->VerticalScrollbarNeedsPaintInvalidation()); | 
| 136 | 136 | 
| 137   ThreadState::Current()->CollectAllGarbage(); | 137   ThreadState::Current()->CollectAllGarbage(); | 
| 138 } | 138 } | 
| 139 | 139 | 
| 140 }  // namespace blink | 140 }  // namespace blink | 
| OLD | NEW | 
|---|