Regression(r188105): Seems to have caused crashes during PLT on some iPads
[WebKit-https.git] / LayoutTests / fast / css / create_element_align.xhtml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4     <head>
5         <title>Align test</title>
6         <style type="text/css" media="all">
7             .center {
8                 text-align : center;
9             }
10         </style>
11         <script type="text/javascript">
12             function runTest() {
13                 var textElement;
14                 var DOMObj = document.getElementById("body");
15
16                 if (DOMObj == null) {
17                     alert("Can't get element with id \"body\"");
18                     return;
19                 }
20
21                 textElement = document.createElement("p");
22                 textElement.setAttribute("class", "center");
23                 textElement.appendChild(document.createTextNode("Should be centered"));
24
25                 DOMObj.appendChild(textElement);
26             }
27         </script>
28     </head>
29     <body id="body" onload="runTest()">
30         <p>Below both lines should be centered. The first is static, the second is dynamically generated using javascript. Bug 14506.</p>
31         <p class="center">Should be centered</p>
32     </body>
33 </html>