Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreePrinterTest.cpp

Issue 2657863004: Move scroll paint property nodes to be owned by the transform tree (Closed)
Patch Set: Rebase & remove parens Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
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 =
130 scrollObjectProperties->scrollTranslation()->scrollNode()->toTreeString();
130 EXPECT_THAT(scrollPathAsString.ascii().data(), 131 EXPECT_THAT(scrollPathAsString.ascii().data(),
131 testing::MatchesRegex("root .* parent.*" 132 testing::MatchesRegex("root .* parent.*"
132 " .* parent.*")); 133 " .* parent.*"));
133 } 134 }
134 135
135 } // namespace blink 136 } // namespace blink
136 137
137 #endif // if DCHECK_IS_ON() 138 #endif // if DCHECK_IS_ON()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698