chromium/third_party/blink/web_tests/fast/css/create_element_align.xhtml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>Align test</title>
        <style type="text/css" media="all">
            .center {
                text-align : center;
            }
        </style>
        <script type="text/javascript">
            function runTest() {
                var textElement;
                var DOMObj = document.getElementById("body");

                if (DOMObj == null) {
                    alert("Can't get element with id \"body\"");
                    return;
                }

                textElement = document.createElement("p");
                textElement.setAttribute("class", "center");
                textElement.appendChild(document.createTextNode("Should be centered"));

                DOMObj.appendChild(textElement);
            }
        </script>
    </head>
    <body id="body" onload="runTest()">
        <p>Below both lines should be centered. The first is static, the second is dynamically generated using javascript. Bug 14506.</p>
        <p class="center">Should be centered</p>
    </body>
</html>