| 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 #ifndef ScrollbarTestSuite_h | 5 #ifndef ScrollbarTestSuite_h |
| 6 #define ScrollbarTestSuite_h | 6 #define ScrollbarTestSuite_h |
| 7 | 7 |
| 8 #include "platform/heap/GarbageCollected.h" | 8 #include "platform/heap/GarbageCollected.h" |
| 9 #include "platform/scroll/ScrollableArea.h" | 9 #include "platform/scroll/ScrollableArea.h" |
| 10 #include "platform/scroll/Scrollbar.h" | 10 #include "platform/scroll/Scrollbar.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 ScrollOffset m_maximumScrollOffset; | 82 ScrollOffset m_maximumScrollOffset; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 class ScrollbarTestSuite : public testing::Test { | 85 class ScrollbarTestSuite : public testing::Test { |
| 86 public: | 86 public: |
| 87 ScrollbarTestSuite() {} | 87 ScrollbarTestSuite() {} |
| 88 | 88 |
| 89 void SetUp() override { | 89 void SetUp() override { |
| 90 TestingPlatformSupport::Config config; | 90 TestingPlatformSupport::Config config; |
| 91 config.compositorSupport = Platform::current()->compositorSupport(); | 91 config.compositorSupport = Platform::current()->compositorSupport(); |
| 92 m_fakePlatform = | 92 m_fakePlatform.reset( |
| 93 WTF::makeUnique<TestingPlatformSupportWithMockScheduler>(config); | 93 WTF::makeUnique<TestingPlatformSupportWithMockScheduler>(config)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void TearDown() override { m_fakePlatform = nullptr; } | |
| 97 | |
| 98 private: | 96 private: |
| 99 std::unique_ptr<TestingPlatformSupportWithMockScheduler> m_fakePlatform; | 97 ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler> |
| 98 m_fakePlatform; |
| 100 }; | 99 }; |
| 101 | 100 |
| 102 } // namespace blink | 101 } // namespace blink |
| 103 | 102 |
| 104 #endif | 103 #endif |
| OLD | NEW |