blob: 35c9300fa993561b7651838896177642ac5b67f4 [file] [log] [blame]
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<script src="../../resources/js-test-pre.js"></script>
<title>OBJECT - border=pixel</title>
</head>
<p id="description"></p>
<table border="">
<thead>
<tr>
<th> Title </th>
<th> Actual Image </th>
<th> Expected Image </th>
</tr>
</thead>
<tr><td><div valing="center"> Object Tag with border="50" px </div></td>
<td><object id="objID" data="./resources/images/blue.png" type="image/png" border="50"></object></td>
<td><img src="./resources/images/blue-border.png" /></td>
</tr>
</table>
<div id="console"></div>
<script type="text/javascript">
description('Tests for border attribute with Object tag<br/><a href="https://bugs.webkit.org/show_bug.cgi?id=48596">Bug 48596</a> : HTML5 Conformance Test failure: approved/xhtml5/object_border_pixel.xhtml</p>');
function getStyle(el,styleProp)
{
var x = document.getElementById(el);
if (x.currentStyle)
var y = x.currentStyle[styleProp];
else if (window.getComputedStyle)
var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
return y;
}
function startTests(prop)
{
var value = getStyle('objID', prop);
if (value =="50px")
testPassed(prop + " is " + "50px.");
else
testFailed(prop + " should be " + "50px" + ". Was " + value);
}
startTests("border-top-width");
startTests("border-left-width");
startTests("border-bottom-width");
startTests("border-right-width");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>