| 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 "core/paint/PaintLayerScrollableArea.h" | 5 #include "core/paint/PaintLayerScrollableArea.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
| 10 #include "core/paint/PaintLayer.h" | 10 #include "core/paint/PaintLayer.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 TextDirection dir) override { | 26 TextDirection dir) override { |
| 27 mockSetToolTip(&frame, tooltipText, dir); | 27 mockSetToolTip(&frame, tooltipText, dir); |
| 28 } | 28 } |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 } // namespace { | 31 } // namespace { |
| 32 | 32 |
| 33 class PaintLayerScrollableAreaTest : public RenderingTest { | 33 class PaintLayerScrollableAreaTest : public RenderingTest { |
| 34 public: | 34 public: |
| 35 PaintLayerScrollableAreaTest() | 35 PaintLayerScrollableAreaTest() |
| 36 : RenderingTest(EmptyFrameLoaderClient::create()), | 36 : RenderingTest(EmptyLocalFrameClient::create()), |
| 37 m_chromeClient(new MockChromeClient) {} | 37 m_chromeClient(new MockChromeClient) {} |
| 38 | 38 |
| 39 ~PaintLayerScrollableAreaTest() { | 39 ~PaintLayerScrollableAreaTest() { |
| 40 testing::Mock::VerifyAndClearExpectations(&chromeClient()); | 40 testing::Mock::VerifyAndClearExpectations(&chromeClient()); |
| 41 } | 41 } |
| 42 | 42 |
| 43 MockChromeClient& chromeClient() const override { return *m_chromeClient; } | 43 MockChromeClient& chromeClient() const override { return *m_chromeClient; } |
| 44 | 44 |
| 45 BackgroundPaintLocation backgroundPaintLocation(const char* elementId) { | 45 BackgroundPaintLocation backgroundPaintLocation(const char* elementId) { |
| 46 PaintLayer* paintLayer = | 46 PaintLayer* paintLayer = |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 .Times(1); | 542 .Times(1); |
| 543 scrollableArea->setScrollOffset(ScrollOffset(1, 1), UserScroll); | 543 scrollableArea->setScrollOffset(ScrollOffset(1, 1), UserScroll); |
| 544 | 544 |
| 545 // Programmatic scrolling should not dismiss the tooltip, so setToolTip | 545 // Programmatic scrolling should not dismiss the tooltip, so setToolTip |
| 546 // should not be called for this invocation. | 546 // should not be called for this invocation. |
| 547 EXPECT_CALL(chromeClient(), mockSetToolTip(document().frame(), String(), _)) | 547 EXPECT_CALL(chromeClient(), mockSetToolTip(document().frame(), String(), _)) |
| 548 .Times(0); | 548 .Times(0); |
| 549 scrollableArea->setScrollOffset(ScrollOffset(2, 2), ProgrammaticScroll); | 549 scrollableArea->setScrollOffset(ScrollOffset(2, 2), ProgrammaticScroll); |
| 550 } | 550 } |
| 551 } | 551 } |
| OLD | NEW |