Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
136 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* Contains extra test cases for parts of DOM Level 2 that aren't covered by | ||
* the standard W3C test cases. */ | ||
exports.tests = { | ||
create_empty_document: function () { | ||
var dom = new DOMImplementation(); | ||
var document = dom.createDocument(null, null, null); | ||
assertEquals("Document shouldn't contain any nodes", | ||
0, document.childNodes.length); | ||
}, | ||
create_document_with_namespaceURI_but_not_qualifiedName: function () { | ||
var dom = new DOMImplementation(); | ||
assertThrows('createDocument accepted invalid arguments', | ||
function () { | ||
dom.createDocument("http://example.org/motorcycle", null, null); | ||
}, | ||
DOMException, DOMException.NAMESPACE_ERR); | ||
}, | ||
doctype_ownerDocument: function () { | ||
var dom = new DOMImplementation(); | ||
var doctype = dom.createDocumentType("bananas"); | ||
var document = dom.createDocument(null, null, doctype); | ||
assertEquals('Doctype does not belong to the document', | ||
document, doctype.ownerDocument); | ||
}, | ||
doctype_child_of_ownerDocument: function () { | ||
var dom = new DOMImplementation(); | ||
var doctype = dom.createDocumentType("hatstand"); | ||
var document = dom.createDocument(null, null, doctype); | ||
assertEquals('Doctype is not a child of the document', | ||
doctype, document.firstChild); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters