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

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

Issue 2764753007: [LayoutNG] Add NGLineBoxFragment (Closed)
Patch Set: Rebase again as other CLs landed faster Created 3 years, 9 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/ng_inline_node_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
index dccce555d7fa6aac15b6e5a4835dc4126d51dc4f..9c6e51ce993dd2d895c8d96e09c076a29bbf1132 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
@@ -10,6 +10,7 @@
#include "core/layout/ng/ng_fragment_builder.h"
#include "core/layout/ng/ng_line_builder.h"
#include "core/layout/ng/ng_physical_box_fragment.h"
+#include "core/layout/ng/ng_physical_line_box_fragment.h"
#include "core/layout/ng/ng_physical_text_fragment.h"
#include "core/layout/ng/ng_text_fragment.h"
#include "core/layout/ng/ng_text_layout_algorithm.h"
@@ -98,9 +99,12 @@ class NGInlineNodeTest : public RenderingTest {
algorithm.LayoutInline(&line_builder);
RefPtr<NGLayoutResult> result = line_builder.CreateFragments();
- for (const auto& child :
- toNGPhysicalBoxFragment(result->PhysicalFragment().get())
- ->Children()) {
+ const NGPhysicalBoxFragment* container =
+ toNGPhysicalBoxFragment(result->PhysicalFragment().get());
+ EXPECT_EQ(container->Children().size(), 1u);
+ const NGPhysicalLineBoxFragment* line =
+ toNGPhysicalLineBoxFragment(container->Children()[0].get());
+ for (const auto& child : line->Children()) {
fragments_out->push_back(toNGPhysicalTextFragment(child.get()));
}
}

Powered by Google App Engine
This is Rietveld 408576698