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

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc

Issue 2815003006: [LayoutNG] Handle floats/OOF at the beginning of inline in inline context (Closed)
Patch Set: Resolve merge conflict Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
index 4976df7870346cb829d2b27dbfa9b58f400837dc..bee54c309648f28ba9d46c4be96563f0e2d905a8 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
@@ -133,25 +133,25 @@ TEST_F(NGInlineLayoutAlgorithmTest, TextFloatsAroundFloatsBefore) {
ToLayoutText(GetLayoutObjectByElementId("text")->SlowFirstChild());
DCHECK(layout_text->HasTextBoxes());
- ASSERT_EQ(4UL, text_fragments.size());
+ // Line break points may vary by minor differences in fonts.
+ // The test is valid as long as we have 3 or more lines and their positions
+ // are correct.
+ EXPECT_GE(text_fragments.size(), 3UL);
auto* text_fragment1 = text_fragments[0];
// 40 = #left-float1' width 30 + #left-float2 10
EXPECT_EQ(LayoutUnit(40), text_fragment1->LeftOffset());
- EXPECT_EQ("The quick ", text_fragment1->Text());
InlineTextBox* inline_text_box1 = layout_text->FirstTextBox();
EXPECT_EQ(LayoutUnit(40), inline_text_box1->X());
auto* text_fragment2 = text_fragments[1];
// 40 = #left-float1' width 30
EXPECT_EQ(LayoutUnit(30), text_fragment2->LeftOffset());
- EXPECT_EQ("brown fox ", text_fragment2->Text());
InlineTextBox* inline_text_box2 = inline_text_box1->NextTextBox();
EXPECT_EQ(LayoutUnit(30), inline_text_box2->X());
auto* text_fragment3 = text_fragments[2];
EXPECT_EQ(LayoutUnit(), text_fragment3->LeftOffset());
- EXPECT_EQ("jumps over the lazy ", text_fragment3->Text());
InlineTextBox* inline_text_box3 = inline_text_box2->NextTextBox();
EXPECT_EQ(LayoutUnit(), inline_text_box3->X());
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_block_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698