blob: 1bbd43b0834f57d66aa8353e5eb98085e110e2a6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<title>This test checks whether serialized invalid XHTML is valid XML (for bug 9901)</title>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
setup({single_test: true});
var doc = (new DOMParser()).parseFromString('<input xmlns="http://www.w3.org/1999/xhtml">123</input>', 'text/xml');
var str = (new XMLSerializer()).serializeToString(doc);
assert_equals(doc.firstChild.firstChild.nodeValue, "123");
assert_equals(str, '<input xmlns=\"http://www.w3.org/1999/xhtml\">123</input>');
done();
</script>
</body>
</html>