blob: b2a4fca4225d62f25ea45f92e2222c60fff25604 [file] [log] [blame]
<title>Layout test for WebKit bug 85581</title>
if (window.testRunner)
function log(message)
var console = document.getElementById('console');
function runTest()
var tableHeight = document.getElementById('table').offsetHeight;
var div1Height = parseInt(document.getElementById('div1').style.height);
var div2Height = parseInt(document.getElementById('div2').style.height);
var imageHeight = document.getElementById('image').height;
var contentsHeight = div1Height + div2Height + imageHeight;
log("Height of table: " + tableHeight);
log("Height of table contents: " + contentsHeight);
if (contentsHeight < tableHeight)
log("PASS: Table contents do not overflow outside of table border.");
log("FAIL: Table contents overflow outside of table border.");
<body onload="runTest()">
<table id="table" style="width: 100%;" border="1">
<td style="vertical-align: top;">
<div id="div1" style="height: 200px; width: 100%;"></div>
<img id="image" src="resources/square-blue-100x100.png" style="height: 60%;">
<div id="div2" style="height: 20px; width: 100%;"></div>
<p> Layout test for <a href="">WebKit bug 85581</a>. </p>
<p> This tests that the contents of a table do not overflow when the table contains an image with percentage height. For this test to pass, the blue rectangle should be entirely within the table border and/or you should see a 'PASS' message below. </p>
<p id="console"></p>