Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLDivElement / align / getset.html
blob035755c547a973c15f9f2db72a88e077a7735d66
1 <html>
2 <head>
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);
11 function test() {
12 if (window.testRunner) {
13 window.testRunner.dumpAsText();
15 //test get align
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') &&
28 (divN.align==""))
29 print("Get: passed");
30 else
31 print("Get: failed");
34 divL.align = "right";
35 divR.align = "";
36 divC.align = "justify";
37 divJ.align = "bad";
38 divB.align = "left";
39 divN.align = "center";
41 if ((divL.align=='right') &&
42 (divR.align=='') &&
43 (divC.align=='justify') &&
44 (divJ.align=='bad') &&
45 (divB.align=='left') &&
46 (divN.align=="center"))
47 print("Set: passed");
48 else
49 print("Set: failed");
52 </script>
53 </head>
54 <body onload="test()">
55 <p>Tests: getting and setting HTMLDivElement::align<br>
56 </p>
57 <p>Condition(s):<br>
58 Testing valid, invalid, and empty values
59 </p>
60 <p>Success message: passed</p>
61 <p>Failure message: failed</p>
62 <hr>
64 <!--
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>
71 -->
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>
80 <div id='console'/>
82 </body>
83 </html>