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

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

Issue 2551793002: [LayoutNG] NGInlineLayoutAlgorithm and NGTextLayoutAlgorithm (Closed)
Patch Set: Resolved merge conflicts Created 4 years 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 a0cac20d54c894818603370c2274511aa3d441d3..c44883af3000e6c7181b5e26cdccba3738815d87 100644
--- a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
+++ b/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
@@ -51,11 +51,13 @@ TEST_F(NGInlineLayoutTest, BlockWithSingleTextNode) {
NGInlineLayoutAlgorithm* layoutAlgorithm = new NGInlineLayoutAlgorithm(
blockFlow->style(), inlineBox, constraintSpace);
+ NGPhysicalFragmentBase* fragment;
+ while (layoutAlgorithm->Layout(nullptr, &fragment, nullptr) != kNewFragment) {
+ // Repeat until layout completes.
+ }
+
String expectedText("Hello World!");
EXPECT_EQ(expectedText, inlineBox->Text(0, 12));
-
- NGPhysicalFragmentBase* fragment;
- layoutAlgorithm->Layout(nullptr, &fragment, nullptr);
}
TEST_F(NGInlineLayoutTest, BlockWithTextAndAtomicInline) {
@@ -78,13 +80,15 @@ TEST_F(NGInlineLayoutTest, BlockWithTextAndAtomicInline) {
NGInlineLayoutAlgorithm* layoutAlgorithm = new NGInlineLayoutAlgorithm(
blockFlow->style(), inlineBox, constraintSpace);
+ NGPhysicalFragmentBase* fragment;
+ while (layoutAlgorithm->Layout(nullptr, &fragment, nullptr) != kNewFragment) {
+ // Repeat until layout completes.
+ }
+
String expectedText("Hello ");
expectedText.append(objectReplacementCharacter);
expectedText.append(".");
EXPECT_EQ(expectedText, inlineBox->Text(0, 8));
-
- NGPhysicalFragmentBase* fragment;
- layoutAlgorithm->Layout(nullptr, &fragment, nullptr);
}
} // 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