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

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

Issue 2299823002: [LayoutNG] Merge NGDerivedConstraintSpace into NGConstraintSpace (Closed)
Patch Set: Fix copy constructors Created 4 years, 4 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_constraint_space_test.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
index 9229e4d8c3439693cf4f1050c46ddb2ebd8554f1..4a392c382aefbd2ceb5df0f944d2df36e494e8c2 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
@@ -4,7 +4,6 @@
#include "core/layout/ng/ng_constraint_space.h"
-#include "core/layout/ng/ng_derived_constraint_space.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
@@ -12,9 +11,12 @@ namespace blink {
namespace {
TEST(NGConstraintSpaceTest, WritingMode) {
- NGConstraintSpace* horz_space = new NGDerivedConstraintSpace(
- HorizontalTopBottom, NGLogicalSize(LayoutUnit(200), LayoutUnit(100)),
- true, false, true, false, FragmentColumn);
+ NGConstraintSpace* horz_space = new NGConstraintSpace(
+ HorizontalTopBottom, NGLogicalSize(LayoutUnit(200), LayoutUnit(100)));
+ horz_space->SetOverflowTriggersScrollbar(true, false);
+ horz_space->SetFixedSize(true, false);
+ horz_space->SetFragmentationType(FragmentColumn);
+
NGConstraintSpace* vert_space =
new NGConstraintSpace(VerticalRightLeft, horz_space);
@@ -41,18 +43,7 @@ TEST(NGConstraintSpaceTest, WritingMode) {
}
TEST(NGConstraintSpaceTest, LayoutOpportunities) {
- NGPhysicalSize physical_size;
- physical_size.width = LayoutUnit(600);
- physical_size.height = LayoutUnit(400);
- auto* physical_space = new NGPhysicalConstraintSpace(physical_size);
- auto* space = new NGConstraintSpace(HorizontalTopBottom, physical_space);
-
- bool for_inline_or_bfc = false;
- auto iterator = space->LayoutOpportunities(NGClearNone, for_inline_or_bfc);
-
- auto firstOpportunity = iterator.Next();
- EXPECT_EQ(LayoutUnit(600), firstOpportunity->Size().inline_size);
- EXPECT_EQ(LayoutUnit(400), firstOpportunity->Size().block_size);
+ // TODO(eae): Implement in followup change.
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698