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

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

Issue 2655783006: Top down version of algorithm to position margins and floats in LayoutNG (Closed)
Patch Set: git rebase-update Created 3 years, 11 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 8a6fe311fa19006ebf973aad2a486e2859413dfe..491177136397ea6139d0e0c238dc984c44471024 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
@@ -151,9 +151,10 @@ TEST(NGConstraintSpaceTest, LayoutOpportunitiesTwoInMiddle) {
//
// Expected:
// Layout opportunity iterator generates the next opportunities:
-// - 1st Start Point (0, 200): 350x150, 250x200
-// - 3rd Start Point (550, 200): 50x200
-// - 4th Start Point (0, 300): 600x50, 500x100
+// - 1st Start Point (0, 200): 350x150, 250x400
+// - 3rd Start Point (550, 200): 50x400
+// - 4th Start Point (0, 300): 600x50, 500x300
+// - 5th Start Point (0, 400): 600x200
// All other opportunities that are located before the origin point should be
// filtered out.
TEST(NGConstraintSpaceTest, LayoutOpportunitiesTwoInMiddleWithOriginAndLeader) {
@@ -181,12 +182,16 @@ TEST(NGConstraintSpaceTest, LayoutOpportunitiesTwoInMiddleWithOriginAndLeader) {
new NGLayoutOpportunityIterator(space, origin_point, leader_point);
// 1st Start Point
EXPECT_EQ("250,200 350x150", OpportunityToString(iterator->Next()));
- EXPECT_EQ("250,200 250x200", OpportunityToString(iterator->Next()));
+ EXPECT_EQ("250,200 250x400", OpportunityToString(iterator->Next()));
// 2nd Start Point
- EXPECT_EQ("550,200 50x200", OpportunityToString(iterator->Next()));
+ EXPECT_EQ("550,200 50x400", OpportunityToString(iterator->Next()));
// 3rd Start Point
EXPECT_EQ("0,300 600x50", OpportunityToString(iterator->Next()));
- EXPECT_EQ("0,300 500x100", OpportunityToString(iterator->Next()));
+ EXPECT_EQ("0,300 500x300", OpportunityToString(iterator->Next()));
+ // 4th Start Point
+ EXPECT_EQ("0,400 600x200", OpportunityToString(iterator->Next()));
+ // TODO(glebl): The opportunity below should not be generated.
+ EXPECT_EQ("250,400 350x200", OpportunityToString(iterator->Next()));
// Iterator is exhausted.
EXPECT_EQ("(empty)", OpportunityToString(iterator->Next()));
}

Powered by Google App Engine
This is Rietveld 408576698