| 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/GraphicsLayer.h" | 7 #include "platform/graphics/GraphicsLayer.h" |
| 8 #include "platform/scroll/ScrollbarTheme.h" | 8 #include "platform/scroll/ScrollbarTheme.h" |
| 9 #include "platform/scroll/ScrollbarThemeMock.h" | 9 #include "platform/scroll/ScrollbarThemeMock.h" |
| 10 #include "platform/testing/TestingPlatformSupport.h" | 10 #include "platform/testing/TestingPlatformSupport.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 { | 155 { |
| 156 ScrollbarTheme::setMockScrollbarsEnabled(true); | 156 ScrollbarTheme::setMockScrollbarsEnabled(true); |
| 157 OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::
create(IntPoint(0, 100)); | 157 OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::
create(IntPoint(0, 100)); |
| 158 MockGraphicsLayerClient graphicsLayerClient; | 158 MockGraphicsLayerClient graphicsLayerClient; |
| 159 MockGraphicsLayer graphicsLayer(&graphicsLayerClient); | 159 MockGraphicsLayer graphicsLayer(&graphicsLayerClient); |
| 160 graphicsLayer.setDrawsContent(true); | 160 graphicsLayer.setDrawsContent(true); |
| 161 graphicsLayer.setSize(FloatSize(111, 222)); | 161 graphicsLayer.setSize(FloatSize(111, 222)); |
| 162 | 162 |
| 163 EXPECT_CALL(*scrollableArea, layerForHorizontalScrollbar()).WillRepeatedly(R
eturn(&graphicsLayer)); | 163 EXPECT_CALL(*scrollableArea, layerForHorizontalScrollbar()).WillRepeatedly(R
eturn(&graphicsLayer)); |
| 164 | 164 |
| 165 RefPtrWillBeRawPtr<Scrollbar> scrollbar = Scrollbar::create(scrollableArea.g
et(), HorizontalScrollbar, RegularScrollbar, nullptr); | 165 RefPtrWillBeRawPtr<Scrollbar> scrollbar = Scrollbar::create(scrollableArea.g
et(), HorizontalScrollbar, RegularScrollbar); |
| 166 graphicsLayer.resetTrackedPaintInvalidations(); | 166 graphicsLayer.resetTrackedPaintInvalidations(); |
| 167 scrollbar->setNeedsPaintInvalidation(); | 167 scrollbar->setNeedsPaintInvalidation(); |
| 168 EXPECT_TRUE(graphicsLayer.hasTrackedPaintInvalidations()); | 168 EXPECT_TRUE(graphicsLayer.hasTrackedPaintInvalidations()); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace blink | 171 } // namespace blink |
| OLD | NEW |