blob: cf1f16e352924205d4d8a53140de08333a908b7f (
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
|
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<script src="../../resources/js-test.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>
</body>
</html>
|