<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <script type="text/javascript">
    function runTest()
    {
        if (window.testRunner)
            testRunner.dumpAsText();

        var target = document.getElementById("target");

        var a = document.createElementNS("", "a");
        a.setAttribute('href', '#');

        target.appendChild(a);

        var serializer = new XMLSerializer();
        var xmlString = serializer.serializeToString(target);

        var outputText = document.getElementById("output");
        outputText.textContent = xmlString;
    }
    </script>
</head>
    <body onload="runTest()">
This tests that XMLSerializer.serializeToString() correctly writes out an empty default namespace declaration if the element is not in any namespace.
        <div id="target"/>
        <div id="output"/>
    </body>
</html>
