3 <title>Div test
</title>
4 <script type=
"text/javascript">
5 function print(message
) {
6 var paragraph
= document
.createElement("p");
7 paragraph
.appendChild(document
.createTextNode(message
));
8 document
.getElementById("console").appendChild(paragraph
);
12 if (window
.testRunner
) {
13 window
.testRunner
.dumpAsText();
16 var divL
= document
.getElementById("divLeft");
17 var divR
= document
.getElementById("divRight");
18 var divC
= document
.getElementById("divCenter");
19 var divJ
= document
.getElementById("divJustify");
20 var divB
= document
.getElementById("divBad");
21 var divN
= document
.getElementById("divNone");
23 if ((divL
.align
=='left') &&
24 (divR
.align
=='right') &&
25 (divC
.align
=='center') &&
26 (divJ
.align
=='justify') &&
27 (divB
.align
=='bad') &&
36 divC
.align
= "justify";
39 divN
.align
= "center";
41 if ((divL
.align
=='right') &&
43 (divC
.align
=='justify') &&
44 (divJ
.align
=='bad') &&
45 (divB
.align
=='left') &&
46 (divN
.align
=="center"))
54 <body onload=
"test()">
55 <p>Tests: getting and setting HTMLDivElement::align
<br>
58 Testing valid, invalid, and empty values
60 <p>Success message: passed
</p>
61 <p>Failure message: failed
</p>
65 <div align="left" id="divLeft">test left</div>
66 <div align="right" id="divRight">test right</div>
67 <div align="center" id="divCenter">test center</div>
68 <div align="justify" id="divJustify">test justify</div>
69 <div align="bad" id="divBad">test bad</div>
70 <div id="divNone">test none</div>
72 <div align=
"left" id=
"divLeft"></div>
73 <div align=
"right" id=
"divRight"></div>
74 <div align=
"center" id=
"divCenter"></div>
75 <div align=
"justify" id=
"divJustify"></div>
76 <div align=
"bad" id=
"divBad"></div>
77 <div id=
"divNone"></div>