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

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

Issue 2871733003: [LayoutNG] Refactor NGLineBreaker for ShapingLineBreaker (Closed)
Patch Set: Cleanup Created 3 years, 7 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
Index: third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc
index 85227fffcfa30b25873680cf757cd42d3728fa76..313846c72a5a19e37932504c32051d0388f890b8 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_test.cc
@@ -325,13 +325,11 @@ TEST_F(NGInlineNodeTest, CreateLineBidiIsolate) {
TEST_F(NGInlineNodeTest, MinMaxContentSize) {
UseLayoutObjectAndAhem();
NGInlineNodeForTest* node = CreateInlineNode();
- node->Append("AB CDE", style_.Get(), layout_object_);
+ node->Append("AB CDEF", style_.Get(), layout_object_);
node->ShapeText();
MinMaxContentSize sizes = node->ComputeMinMaxContentSize();
- // TODO(kojii): min_content should be 20, but is 30 until
- // NGInlineLayoutAlgorithm implements trailing spaces correctly.
- EXPECT_EQ(30, sizes.min_content);
- EXPECT_EQ(60, sizes.max_content);
+ EXPECT_EQ(40, sizes.min_content);
+ EXPECT_EQ(70, sizes.max_content);
}
TEST_F(NGInlineNodeTest, MinMaxContentSizeElementBoundary) {
@@ -343,9 +341,7 @@ TEST_F(NGInlineNodeTest, MinMaxContentSizeElementBoundary) {
MinMaxContentSize sizes = node->ComputeMinMaxContentSize();
// |min_content| should be the width of "BC" because there is an element
// boundary between "B" and "C" but no break opportunities.
- // TODO(kojii): min_content should be 20, but is 30 until
- // NGInlineLayoutAlgorithm implements trailing spaces correctly.
- EXPECT_EQ(30, sizes.min_content);
+ EXPECT_EQ(20, sizes.min_content);
EXPECT_EQ(60, sizes.max_content);
}

Powered by Google App Engine
This is Rietveld 408576698