Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / create_element_align.xhtml
blobb1f3c368cfe2a5db3488623d4b60a86a97dc51f6
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;
10 </style>
11 <script type="text/javascript">
12 function runTest() {
13 var textElement;
14 var DOMObj = document.getElementById("body");
16 if (DOMObj == null) {
17 alert("Can't get element with id \"body\"");
18 return;
21 textElement = document.createElement("p");
22 textElement.setAttribute("class", "center");
23 textElement.appendChild(document.createTextNode("Should be centered"));
25 DOMObj.appendChild(textElement);
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>