blob: 05fc48015b663be62992bcaef930260245b8f479 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<!DOCTYPE html>
<html>
<head>
<title>WebKit Bug 14858: col width ignored when not tied to a single cell</title>
<link href="http://www.w3.org/TR/REC-CSS2/tables.html#q4" rel="help" />
<script src="../../resources/js-test.js"></script>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.dumpAsText();
function runTest()
{
var testCell = document.getElementById('testCell');
var testTable = document.getElementById('testTable');
description("This tests <a href='http://webkit.org/b/14858'>Bug 14858: <col> width ignored when not tied to a single cell</a>.");
shouldBe("window.getComputedStyle(testCell).width", "'250px'");
shouldBe("window.getComputedStyle(testTable).width", "'500px'");
isSuccessfullyParsed();
}
</script>
<style type="text/css">
div#testDiv {
top: 10px;
position: relative
}
div#info {
position: relative
}
table {border-spacing: 0}
td {
padding: 0;
}
</style>
</head>
<body onload="runTest()">
<div id="info">
Two rows of cells should look identical.<br>
</div>
<div id="testDiv">
<table id="testTable">
<col width="50" />
<col width="100" />
<col width="150" />
<col width="200" />
<tbody>
<tr>
<td style="background-color:red">left</td>
<td style="background-color:green" id="testCell" colspan="2">middle</td>
<td style="background-color:blue">right</td>
</tr>
</tbody>
</table>
<table id="baseTable">
<col width="50" />
<col width="100" />
<col width="150" />
<col width="200" />
<tbody>
<tr>
<td style="background-color:red">left</td>
<td style="background-color:green">middle</td>
<td style="background-color:green"></td>
<td style="background-color:blue">right</td>
</tr>
</tbody>
</table>
</div>
<div id="description"></div>
<div id="console"></div>
</body>
</html>
|