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

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

Issue 2483683003: [LayoutNG] Split apart storage for AvailableSize and PercentageSize. (Closed)
Patch Set: rebase. Created 4 years, 1 month 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 9eb8f08400e011685eb15ec3db1d582615c147e2..367a8d594c9e90dad3bfc3f94b16b51fa7df4285 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
@@ -19,7 +19,7 @@ NGConstraintSpace* ConstructConstraintSpace(NGWritingMode writing_mode,
return new NGConstraintSpace(
writing_mode, direction,
new NGPhysicalConstraintSpace(
- size, /* fixed_width */ true, /* fixed_height */ false,
+ size, size, /* fixed_width */ true, /* fixed_height */ false,
/* width_direction_triggers_scrollbar */ true,
/* height_direction_triggers_scrollbar */ false, FragmentNone,
FragmentColumn, /* is_new_fc */ false));
@@ -27,6 +27,7 @@ NGConstraintSpace* ConstructConstraintSpace(NGWritingMode writing_mode,
TEST(NGConstraintSpaceTest, WritingMode) {
NGPhysicalConstraintSpace* phy_space = new NGPhysicalConstraintSpace(
+ NGPhysicalSize(LayoutUnit(200), LayoutUnit(100)),
NGPhysicalSize(LayoutUnit(200), LayoutUnit(100)), /* fixed_width */ true,
/* fixed_height */ false, /* width_direction_triggers_scrollbar */ true,
/* height_direction_triggers_scrollbar */ false, FragmentNone,
@@ -38,11 +39,11 @@ TEST(NGConstraintSpaceTest, WritingMode) {
NGConstraintSpace* vert_space =
new NGConstraintSpace(VerticalRightLeft, LeftToRight, phy_space);
- EXPECT_EQ(LayoutUnit(200), horz_space->ContainerSize().inline_size);
- EXPECT_EQ(LayoutUnit(200), vert_space->ContainerSize().block_size);
+ EXPECT_EQ(LayoutUnit(200), horz_space->AvailableSize().inline_size);
+ EXPECT_EQ(LayoutUnit(200), vert_space->AvailableSize().block_size);
- EXPECT_EQ(LayoutUnit(100), horz_space->ContainerSize().block_size);
- EXPECT_EQ(LayoutUnit(100), vert_space->ContainerSize().inline_size);
+ EXPECT_EQ(LayoutUnit(100), horz_space->AvailableSize().block_size);
+ EXPECT_EQ(LayoutUnit(100), vert_space->AvailableSize().inline_size);
EXPECT_TRUE(horz_space->InlineTriggersScrollbar());
EXPECT_TRUE(vert_space->BlockTriggersScrollbar());

Powered by Google App Engine
This is Rietveld 408576698