blob: bfa69b64e111284a6275363e5d0abccd5178ed31 [file] [log] [blame]
<!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="../js/resources/js-test-pre.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: &lt;col&gt; 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>