Commit 91734bd8 authored by andersca's avatar andersca

2006-01-03 Anders Carlsson <andersca@mac.com>

        Reviewed by Maciej.

        - Add test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5378
        createDocument fails with DOM Exception 5 when passed empty qname

        * dom/html/level2/core/createDocument08-expected.txt:
        * dom/xhtml/level2/core/createDocument08-expected.txt:
        These now fail.

        * fast/dom/createDocument-empty-expected.txt: Added.
        * fast/dom/createDocument-empty.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a75a29b0
2006-01-03 Anders Carlsson <andersca@mac.com>
Reviewed by Maciej.
- Add test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5378
createDocument fails with DOM Exception 5 when passed empty qname
* dom/html/level2/core/createDocument08-expected.txt:
* dom/xhtml/level2/core/createDocument08-expected.txt:
These now fail.
* fast/dom/createDocument-empty-expected.txt: Added.
* fast/dom/createDocument-empty.html: Added.
2006-01-03 Anders Carlsson <andersca@mac.com>
Reviewed by Darin.
......
Test: http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08
Status: Success
Test: http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08
Status: failure
Detail: throw_INVALID_CHARACTER_ERR: assertTrue failed
Test http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08
Status Success
Status failure
Message throw_INVALID_CHARACTER_ERR: assertTrue failed
This tests that it should be possible to create documents with empty/null qnames and namespaceURIs. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed.
SUCCESS!
<html>
<head>
<script>
function debug(str) {
pre = document.getElementById('console');
txt = document.createTextNode(str)
pre.appendChild(txt)
}
function runTests() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var uri = 'http://www.example.org';
// Both null namespaceURI and qname
try {
var doc = document.implementation.createDocument(null, null, null)
if (doc.documentElement) {
debug('FAILURE: Document created should not have a document element')
return;
}
} catch (e) {
debug('FAILURE: Got exception ' + e.message + ' when creating document with null namespaceURI and qualifiedName')
return;
}
// Both empty namespaceURI and qname
try {
var doc = document.implementation.createDocument('', '', null)
if (doc.documentElement) {
debug('FAILURE: Document created should not have a document element')
return;
}
} catch (e) {
debug('FAILURE: Got exception ' + e.message + ' when creating document with empty namespaceURI and qualifiedName')
return;
}
// Null namespaceURI with qname
try {
var doc = document.implementation.createDocument(null, 'test', null)
if (!doc.documentElement) {
debug('FAILURE: Document created should have a document element')
return;
}
} catch (e) {
debug('FAILURE: Got exception ' + e.message + ' when creating document with null namespaceURI')
return;
}
// Empty namespaceURI with qname
try {
var doc = document.implementation.createDocument('', 'test', null)
if (!doc.documentElement) {
debug('FAILURE: Document created should have a document element')
return;
}
} catch (e) {
debug('FAILURE: Got exception ' + e.message + ' when creating document with empty namespaceURI')
return;
}
// namespaceURI with empty qname
try {
var doc = document.implementation.createDocument(uri, '', null)
if (doc.documentElement) {
debug('FAILURE: Document created should not have a document element')
return;
}
} catch (e) {
debug('FAILURE: Got exception ' + e.message + ' when creating document with empty namespaceURI')
return;
}
debug('SUCCESS!')
}
</script>
</head>
<body onload="runTests();">
This tests that it should be possible to create documents with empty/null qnames and namespaceURIs. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed.
<pre id="console">
</pre>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment