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

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

Issue 2870413005: [LayoutNG] Add "Control" NGInlineItemType for newlines and tabs (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder_test.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/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 4adb7f83aeb8e920a6bcd4fe72d614d6428303ea..85227fffcfa30b25873680cf757cd42d3728fa76 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
@@ -144,6 +144,18 @@ TEST_F(NGInlineNodeTest, CollectInlinesText) {
EXPECT_EQ(5u, items.size());
}
+TEST_F(NGInlineNodeTest, CollectInlinesBR) {
+ SetupHtml("t", u"<div id=t>Hello<br>World</div>");
+ NGInlineNodeForTest* node = CreateInlineNode();
+ node->CollectInlines(layout_object_, layout_block_flow_);
+ EXPECT_EQ("Hello\nWorld", node->Text());
+ Vector<NGInlineItem>& items = node->Items();
+ TEST_ITEM_TYPE_OFFSET(items[0], kText, 0u, 5u);
+ TEST_ITEM_TYPE_OFFSET(items[1], kControl, 5u, 6u);
+ TEST_ITEM_TYPE_OFFSET(items[2], kText, 6u, 11u);
+ EXPECT_EQ(3u, items.size());
+}
+
TEST_F(NGInlineNodeTest, CollectInlinesRtlText) {
SetupHtml("t", u"<div id=t dir=rtl>\u05E2 <span>\u05E2</span> \u05E2</div>");
NGInlineNodeForTest* node = CreateInlineNode();
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698