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

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

Issue 2477843002: Revert of Add support of leader_point in NGLayoutOpportunityIterator. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..701baf31ed0c9ee62de0c70380d12ea5951e975c 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
@@ -197,19 +197,19 @@
}
// This test is the same as LayoutOpportunitiesTwoInMiddle with the only
-// difference that NGLayoutOpportunityIterator takes 2 additional arguments:
-// - origin_point that changes the iterator to return Layout Opportunities that
+// difference that NGLayoutOpportunityIterator takes the additional argument
+// origin_point that changes the iterator to return Layout Opportunities that
// lay after the origin point.
-// - leader_point that together with origin_point creates a temporary exclusion
//
// Expected:
// Layout opportunity iterator generates the next opportunities:
-// - 1st Start Point (0, 200): 350x150, 250x200
+// - 1st Start Point (0, 200): 150x200
+// - 2nd Start Point (250, 200): 350x150, 250x200
// - 3rd Start Point (550, 200): 50x200
// - 4th Start Point (0, 300): 600x50, 500x100
// All other opportunities that are located before the origin point should be
// filtered out.
-TEST(NGConstraintSpaceTest, LayoutOpportunitiesTwoInMiddleWithOriginAndLeader) {
+TEST(NGConstraintSpaceTest, LayoutOpportunitiesTwoInMiddleWithOrigin) {
NGPhysicalSize physical_size;
physical_size.width = LayoutUnit(600);
physical_size.height = LayoutUnit(400);
@@ -231,18 +231,19 @@
space->AddExclusion(exclusion2);
const NGLogicalOffset origin_point = {LayoutUnit(0), LayoutUnit(200)};
- const NGLogicalOffset leader_point = {LayoutUnit(250), LayoutUnit(300)};
- auto* iterator =
- new NGLayoutOpportunityIterator(space, origin_point, leader_point);
+ auto* iterator = new NGLayoutOpportunityIterator(space, origin_point);
// 1st Start Point
+ EXPECT_EQ("0,200 150x200", OpportunityToString(iterator->Next()));
+
+ // 2nd Start Point
EXPECT_EQ("250,200 350x150", OpportunityToString(iterator->Next()));
EXPECT_EQ("250,200 250x200", OpportunityToString(iterator->Next()));
- // 2nd Start Point
+ // 3rd Start Point
EXPECT_EQ("550,200 50x200", OpportunityToString(iterator->Next()));
- // 3rd Start Point
+ // 4th Start Point
EXPECT_EQ("0,300 600x50", OpportunityToString(iterator->Next()));
EXPECT_EQ("0,300 500x100", OpportunityToString(iterator->Next()));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698