| 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/PaintPropertyTreePrinter.h" | 5 #include "core/paint/PaintPropertyTreePrinter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutObject.h" | 7 #include "core/layout/LayoutObject.h" |
| 8 #include "core/layout/LayoutTestHelper.h" | 8 #include "core/layout/LayoutTestHelper.h" |
| 9 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | 9 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
| 10 #include "testing/gmock/include/gmock/gmock-matchers.h" | 10 #include "testing/gmock/include/gmock/gmock-matchers.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 #if DCHECK_IS_ON() | 13 #if DCHECK_IS_ON() |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 typedef bool TestParamRootLayerScrolling; | 17 typedef bool TestParamRootLayerScrolling; |
| 18 class PaintPropertyTreePrinterTest | 18 class PaintPropertyTreePrinterTest |
| 19 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, | 19 : public ::testing::WithParamInterface<TestParamRootLayerScrolling>, |
| 20 private ScopedSlimmingPaintV2ForTest, | 20 private ScopedSlimmingPaintV2ForTest, |
| 21 private ScopedRootLayerScrollingForTest, | 21 private ScopedRootLayerScrollingForTest, |
| 22 public RenderingTest { | 22 public RenderingTest { |
| 23 public: | 23 public: |
| 24 PaintPropertyTreePrinterTest() | 24 PaintPropertyTreePrinterTest() |
| 25 : ScopedSlimmingPaintV2ForTest(true), | 25 : ScopedSlimmingPaintV2ForTest(true), |
| 26 ScopedRootLayerScrollingForTest(GetParam()), | 26 ScopedRootLayerScrollingForTest(GetParam()), |
| 27 RenderingTest(SingleChildFrameLoaderClient::create()) {} | 27 RenderingTest(SingleChildLocalFrameClient::create()) {} |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 void SetUp() override { | 30 void SetUp() override { |
| 31 Settings::setMockScrollbarsEnabled(true); | 31 Settings::setMockScrollbarsEnabled(true); |
| 32 | 32 |
| 33 RenderingTest::SetUp(); | 33 RenderingTest::SetUp(); |
| 34 enableCompositing(); | 34 enableCompositing(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void TearDown() override { | 37 void TearDown() override { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 String scrollPathAsString = | 129 String scrollPathAsString = |
| 130 scrollObjectProperties->scrollTranslation()->scrollNode()->toTreeString(); | 130 scrollObjectProperties->scrollTranslation()->scrollNode()->toTreeString(); |
| 131 EXPECT_THAT(scrollPathAsString.ascii().data(), | 131 EXPECT_THAT(scrollPathAsString.ascii().data(), |
| 132 testing::MatchesRegex("root .* parent.*" | 132 testing::MatchesRegex("root .* parent.*" |
| 133 " .* parent.*")); | 133 " .* parent.*")); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace blink | 136 } // namespace blink |
| 137 | 137 |
| 138 #endif // if DCHECK_IS_ON() | 138 #endif // if DCHECK_IS_ON() |
| OLD | NEW |