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

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

Issue 2649583002: [LayoutNG] Remove the ng_layout_coordinator and temporary LayoutSync method. (Closed)
Patch Set: rebase v2 Created 3 years, 11 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 8d69bfb3cf3e84e38f56719e79dbf2846fd171e1..1645943ddbf5f2e0ebd099f341d0e5c50d0c973d 100644
--- a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
+++ b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
@@ -48,13 +48,10 @@ TEST_F(NGInlineLayoutTest, BlockWithSingleTextNode) {
NGInlineNode* inlineBox =
new NGInlineNode(blockFlow->firstChild(), blockFlow->mutableStyle());
- NGInlineLayoutAlgorithm* layoutAlgorithm = new NGInlineLayoutAlgorithm(
- blockFlow->style(), inlineBox, constraintSpace);
-
- NGPhysicalFragment* fragment;
- while (layoutAlgorithm->Layout(nullptr, &fragment, nullptr) != kNewFragment) {
- // Repeat until layout completes.
- }
+ NGPhysicalFragment* fragment =
+ NGInlineLayoutAlgorithm(blockFlow->style(), inlineBox, constraintSpace)
+ .Layout();
+ EXPECT_TRUE(fragment);
String expectedText("Hello World!");
EXPECT_EQ(expectedText, inlineBox->Text(0, 12));
@@ -77,13 +74,10 @@ TEST_F(NGInlineLayoutTest, BlockWithTextAndAtomicInline) {
NGInlineNode* inlineBox =
new NGInlineNode(blockFlow->firstChild(), blockFlow->mutableStyle());
- NGInlineLayoutAlgorithm* layoutAlgorithm = new NGInlineLayoutAlgorithm(
- blockFlow->style(), inlineBox, constraintSpace);
-
- NGPhysicalFragment* fragment;
- while (layoutAlgorithm->Layout(nullptr, &fragment, nullptr) != kNewFragment) {
- // Repeat until layout completes.
- }
+ NGPhysicalFragment* fragment =
+ NGInlineLayoutAlgorithm(blockFlow->style(), inlineBox, constraintSpace)
+ .Layout();
+ EXPECT_TRUE(fragment);
String expectedText("Hello ");
expectedText.append(objectReplacementCharacter);
« 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