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/paint/PaintControllerPaintTest.h" | 5 #include "core/paint/PaintControllerPaintTest.h" |
6 #include "core/paint/PaintLayerPainter.h" | 6 #include "core/paint/PaintLayerPainter.h" |
7 | 7 |
8 // This file contains tests testing TablePainter, TableSectionPainter, | 8 // This file contains tests testing TablePainter, TableSectionPainter, |
9 // TableRowPainter and TableCellPainter. It's difficult to separate the tests | 9 // TableRowPainter and TableCellPainter. It's difficult to separate the tests |
10 // into individual files because of dependencies among the painter classes. | 10 // into individual files because of dependencies among the painter classes. |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 using TablePainterTest = PaintControllerPaintTest; | 14 using TablePainterTest = PaintControllerPaintTest; |
15 | 15 |
16 TEST_F(TablePainterTest, Background) { | 16 TEST_F(TablePainterTest, Background) { |
17 SetBodyInnerHTML( | 17 SetBodyInnerHTML( |
18 "<style>" | 18 "<style>" |
19 " td { width: 200px; height: 200px; border: none; }" | 19 " td { width: 200px; height: 200px; padding: 0; border: none; }" |
20 " tr { background-color: blue; }" | 20 " tr { background-color: blue; }" |
21 " table { border: none; border-spacing: 0; border-collapse: collapse; }" | 21 " table { border: none; border-spacing: 0 }" |
22 "</style>" | 22 "</style>" |
23 "<table>" | 23 "<table>" |
24 " <tr id='row1'><td></td></tr>" | 24 " <tr id='row1'><td></td></tr>" |
25 " <tr id='row2'><td></td></tr>" | 25 " <tr id='row2'><td></td></tr>" |
26 "</table>"); | 26 "</table>"); |
27 | 27 |
28 LayoutView& layout_view = *GetDocument().GetLayoutView(); | 28 LayoutView& layout_view = *GetDocument().GetLayoutView(); |
29 LayoutObject& row1 = *GetLayoutObjectByElementId("row1"); | 29 LayoutObject& row1 = *GetLayoutObjectByElementId("row1"); |
30 LayoutObject& row2 = *GetLayoutObjectByElementId("row2"); | 30 LayoutObject& row2 = *GetLayoutObjectByElementId("row2"); |
31 | 31 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 EXPECT_DISPLAY_LIST( | 185 EXPECT_DISPLAY_LIST( |
186 RootPaintController().GetDisplayItemList(), 4, | 186 RootPaintController().GetDisplayItemList(), 4, |
187 TestDisplayItem(layout_view, DisplayItem::kDocumentBackground), | 187 TestDisplayItem(layout_view, DisplayItem::kDocumentBackground), |
188 TestDisplayItem(cell, DisplayItem::kBoxDecorationBackground), | 188 TestDisplayItem(cell, DisplayItem::kBoxDecorationBackground), |
189 TestDisplayItem(cell, DisplayItem::kTableCollapsedBorderLast), | 189 TestDisplayItem(cell, DisplayItem::kTableCollapsedBorderLast), |
190 TestDisplayItem(cell, DisplayItem::PaintPhaseToDrawingType( | 190 TestDisplayItem(cell, DisplayItem::PaintPhaseToDrawingType( |
191 kPaintPhaseSelfOutlineOnly))); | 191 kPaintPhaseSelfOutlineOnly))); |
192 } | 192 } |
193 | 193 |
194 } // namespace blink | 194 } // namespace blink |
OLD | NEW |