blob: 0a648fd98f92d2d603611e14bd3508d4da1494d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/layout/layout_table_col.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
namespace blink {
using LayoutTableColTest = RenderingTest;
TEST_F(LayoutTableColTest, LocalVisualRect) {
SetBodyInnerHTML(R"HTML(
<table style='width: 200px; height: 200px'>
<col id='col1' style='visibility: hidden'>
<col id='col2' style='visibility: collapse'>
<col id='col3'>
<tr><td></td><td></td></tr>
</table>
)HTML");
EXPECT_TRUE(GetLayoutObjectByElementId("col1")->LocalVisualRect().IsEmpty());
EXPECT_TRUE(GetLayoutObjectByElementId("col2")->LocalVisualRect().IsEmpty());
EXPECT_TRUE(GetLayoutObjectByElementId("col3")->LocalVisualRect().IsEmpty());
}
} // namespace blink
|