| <!DOCTYPE html> |
| <html> |
| <body> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| |
| description("This tests the fragment parsing algorithm inside a XHTML document without xmlns set on the document element via innerHTML.\n" |
| + "The element without prefix or xmlns attribute should use the default namespace of the context element (that of body element in this case)."); |
| |
| var xhtmlDoctype = document.implementation.createDocumentType('html', |
| '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'); |
| var xmlDocumentWithoutXmlns = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', xhtmlDoctype); |
| evalAndLog("xmlDocumentWithoutXmlns.body = xmlDocumentWithoutXmlns.createElement('body');"); |
| evalAndLog("contextElement = xmlDocumentWithoutXmlns.body;"); |
| shouldBe("contextElement.innerHTML = '<a href=\"\"></a>'; contextElement.body.firstChild.namespaceURI", "'http://www.w3.org/1999/xhtml'"); |
| |
| var successfullyParsed = true; |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |