OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/layout/LayoutBlockFlow.h" | 5 #include "core/layout/LayoutBlockFlow.h" |
6 #include "core/layout/LayoutMultiColumnFlowThread.h" | 6 #include "core/layout/LayoutMultiColumnFlowThread.h" |
7 | 7 |
8 #include "core/layout/LayoutTestHelper.h" | 8 #include "core/layout/LayoutTestHelper.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 setBodyInnerHTML( | 133 setBodyInnerHTML( |
134 "<div style='overflow:-webkit-paged-y; height:200px; line-height:150px;'>" | 134 "<div style='overflow:-webkit-paged-y; height:200px; line-height:150px;'>" |
135 " <div id='block1'>line1</div>" | 135 " <div id='block1'>line1</div>" |
136 " <div id='block2' style='padding-top:2px;'>" | 136 " <div id='block2' style='padding-top:2px;'>" |
137 " <div id='innerBlock' style='padding-top:2px; " | 137 " <div id='innerBlock' style='padding-top:2px; " |
138 "break-before:page;'>line2</div>" | 138 "break-before:page;'>line2</div>" |
139 " </div>" | 139 " </div>" |
140 "</div>"); | 140 "</div>"); |
141 EXPECT_EQ(0, strutForBox("block1")); | 141 EXPECT_EQ(0, strutForBox("block1")); |
142 EXPECT_EQ(0, strutForLine("block1", 0)); | 142 EXPECT_EQ(0, strutForLine("block1", 0)); |
143 // There's no class A break point before #innerBlock (they only exist *between
* siblings), so | 143 // There's no class A break point before #innerBlock (they only exist |
144 // the break is propagated and applied before #block2. | 144 // *between* siblings), so the break is propagated and applied before #block2. |
145 EXPECT_EQ(50, strutForBox("block2")); | 145 EXPECT_EQ(50, strutForBox("block2")); |
146 EXPECT_EQ(0, strutForBox("innerBlock")); | 146 EXPECT_EQ(0, strutForBox("innerBlock")); |
147 EXPECT_EQ(0, strutForLine("innerBlock", 0)); | 147 EXPECT_EQ(0, strutForLine("innerBlock", 0)); |
148 } | 148 } |
149 | 149 |
150 } // namespace blink | 150 } // namespace blink |
OLD | NEW |