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

Unified Diff: third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp

Issue 2676533003: [LayoutNG] Convert physical fragments to being RefCounted. (Closed)
Patch Set: address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
index 897ffa5b0ecd2d31108ced2445a3a599e06258ca..d1660935145c2b8b48e5a33805b5e9d91ec81616 100644
--- a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
+++ b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
@@ -48,7 +48,7 @@ TEST_F(NGInlineLayoutTest, BlockWithSingleTextNode) {
NGInlineNode* inlineBox =
new NGInlineNode(blockFlow->firstChild(), blockFlow->mutableStyle());
- NGPhysicalFragment* fragment =
+ RefPtr<NGPhysicalFragment> fragment =
NGInlineLayoutAlgorithm(blockFlow, blockFlow->style(), inlineBox,
constraintSpace)
.Layout();
@@ -75,7 +75,7 @@ TEST_F(NGInlineLayoutTest, BlockWithTextAndAtomicInline) {
NGInlineNode* inlineBox =
new NGInlineNode(blockFlow->firstChild(), blockFlow->mutableStyle());
- NGPhysicalFragment* fragment =
+ RefPtr<NGPhysicalFragment> fragment =
NGInlineLayoutAlgorithm(blockFlow, blockFlow->style(), inlineBox,
constraintSpace)
.Layout();
@@ -85,6 +85,9 @@ TEST_F(NGInlineLayoutTest, BlockWithTextAndAtomicInline) {
expectedText.append(objectReplacementCharacter);
expectedText.append(".");
EXPECT_EQ(expectedText, inlineBox->Text(0, 8));
+
+ // Delete the line box tree to avoid leaks in the test.
+ blockFlow->deleteLineBoxTree();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698