blob: 035755c547a973c15f9f2db72a88e077a7735d66 [file] [log] [blame]
<html>
<head>
<title>Div test</title>
<script type="text/javascript">
function print(message) {
var paragraph = document.createElement("p");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test() {
if (window.testRunner) {
window.testRunner.dumpAsText();
}
//test get align
var divL = document.getElementById("divLeft");
var divR = document.getElementById("divRight");
var divC = document.getElementById("divCenter");
var divJ = document.getElementById("divJustify");
var divB = document.getElementById("divBad");
var divN = document.getElementById("divNone");
if ((divL.align=='left') &&
(divR.align=='right') &&
(divC.align=='center') &&
(divJ.align=='justify') &&
(divB.align=='bad') &&
(divN.align==""))
print("Get: passed");
else
print("Get: failed");
divL.align = "right";
divR.align = "";
divC.align = "justify";
divJ.align = "bad";
divB.align = "left";
divN.align = "center";
if ((divL.align=='right') &&
(divR.align=='') &&
(divC.align=='justify') &&
(divJ.align=='bad') &&
(divB.align=='left') &&
(divN.align=="center"))
print("Set: passed");
else
print("Set: failed");
}
</script>
</head>
<body onload="test()">
<p>Tests: getting and setting HTMLDivElement::align<br>
</p>
<p>Condition(s):<br>
Testing valid, invalid, and empty values
</p>
<p>Success message: passed</p>
<p>Failure message: failed</p>
<hr>
<!--
<div align="left" id="divLeft">test left</div>
<div align="right" id="divRight">test right</div>
<div align="center" id="divCenter">test center</div>
<div align="justify" id="divJustify">test justify</div>
<div align="bad" id="divBad">test bad</div>
<div id="divNone">test none</div>
-->
<div align="left" id="divLeft"></div>
<div align="right" id="divRight"></div>
<div align="center" id="divCenter"></div>
<div align="justify" id="divJustify"></div>
<div align="bad" id="divBad"></div>
<div id="divNone"></div>
<div id='console'/>
</body>
</html>