| 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" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 TEST_P(PaintPropertyTreePrinterTest, SimpleScrollTreePath) { | 121 TEST_P(PaintPropertyTreePrinterTest, SimpleScrollTreePath) { |
| 122 setBodyInnerHTML( | 122 setBodyInnerHTML( |
| 123 "<div id='scroll' style='overflow: scroll; height: 100px;'>" | 123 "<div id='scroll' style='overflow: scroll; height: 100px;'>" |
| 124 " <div id='forceScroll' style='height: 4000px;'></div>" | 124 " <div id='forceScroll' style='height: 4000px;'></div>" |
| 125 "</div>"); | 125 "</div>"); |
| 126 LayoutObject* scrollObject = | 126 LayoutObject* scrollObject = |
| 127 document().getElementById("scroll")->layoutObject(); | 127 document().getElementById("scroll")->layoutObject(); |
| 128 const auto* scrollObjectProperties = scrollObject->paintProperties(); | 128 const auto* scrollObjectProperties = scrollObject->paintProperties(); |
| 129 String scrollPathAsString = scrollObjectProperties->scroll()->toTreeString(); | 129 String scrollPathAsString = scrollObjectProperties->scroll()->toTreeString(); |
| 130 EXPECT_THAT(scrollPathAsString.ascii().data(), | 130 EXPECT_THAT(scrollPathAsString.ascii().data(), |
| 131 testing::MatchesRegex("root .* scroll.*" | 131 testing::MatchesRegex("root .* parent.*" |
| 132 " .* scroll.*")); | 132 " .* parent.*")); |
| 133 } | 133 } |
| 134 | 134 |
| 135 } // namespace blink | 135 } // namespace blink |
| 136 | 136 |
| 137 #endif // if DCHECK_IS_ON() | 137 #endif // if DCHECK_IS_ON() |
| OLD | NEW |