| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <p>This test checks whether serialized invalid XHTML is valid XML (for bug 9901).</p> |
| <p>If the test passes, you'll see a series of 'PASS' messages below.</p> |
| document.getElementById('console').appendChild(document.createTextNode(s)); |
| log('PASS: ' + a + ' should be ' + b + ' and is.\n'); |
| log('FAIL: ' + a + ' should be ' + b + ' but instead is ' + evalA + '.\n'); |
| var doc = (new DOMParser()).parseFromString('<input xmlns="http://www.w3.org/1999/xhtml">123</input>', 'text/xml'); |
| var str = (new XMLSerializer()).serializeToString(doc); |
| shouldBe('doc.firstChild.firstChild.nodeValue', '123'); |
| shouldBe('str', '<input xmlns=\"http://www.w3.org/1999/xhtml\">123</input>'); |