Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: LayoutTests/fast/dom/implementation-api-args-expected.txt

Issue 22875013: Make several DOMImplementation API arguments mandatory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix createDocument() args Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/implementation-api-args-expected.txt
diff --git a/LayoutTests/fast/dom/implementation-api-args-expected.txt b/LayoutTests/fast/dom/implementation-api-args-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..26cae83c37bf400c43ef806296c95c70c35975b7
--- /dev/null
+++ b/LayoutTests/fast/dom/implementation-api-args-expected.txt
@@ -0,0 +1,64 @@
+Checks that the DOMImplementation api arguments are correctly validated
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
+PASS document.implementation.createDocumentType() threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocumentType("qualifiedName") threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocumentType("qualifiedName", "publicId") threw exception TypeError: Not enough arguments.
+PASS docType = document.implementation.createDocumentType("qualifiedName", "publicId", "systemId") did not throw exception.
+PASS docType.__proto__ is DocumentType.prototype
+PASS docType.name is "qualifiedName"
+PASS docType.publicId is "publicId"
+PASS docType.systemId is "systemId"
+
+XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype);
+PASS document.implementation.createDocument() threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocument("namespace") threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocument("namespace", "qualifiedName") did not throw exception.
+PASS doc = document.implementation.createDocument("namespace", "qualifiedName", null) did not throw exception.
+PASS testDocument.__proto__ is window["XMLDocument"].prototype
+PASS testDocument.documentElement.tagName is "qualifiedName"
+PASS testDocument.documentElement.namespaceURI is "namespace"
+PASS testDocument.doctype is null
+PASS doc = document.implementation.createDocument(null, "qualifiedName", null) did not throw exception.
+PASS testDocument.__proto__ is window["XMLDocument"].prototype
+PASS testDocument.documentElement.tagName is "qualifiedName"
+PASS testDocument.documentElement.namespaceURI is null
+PASS testDocument.doctype is null
+PASS doc = document.implementation.createDocument("", null, null) did not throw exception.
+PASS testDocument.__proto__ is window["XMLDocument"].prototype
+PASS testDocument.documentElement is null
+PASS testDocument.doctype is null
+PASS doc = document.implementation.createDocument("", "", null) did not throw exception.
+PASS testDocument.__proto__ is window["XMLDocument"].prototype
+PASS testDocument.documentElement is null
+PASS testDocument.doctype is null
+PASS doc = document.implementation.createDocument("namespace", "qualifiedName") did not throw exception.
+PASS testDocument.__proto__ is window["XMLDocument"].prototype
+PASS testDocument.documentElement.tagName is "qualifiedName"
+PASS testDocument.documentElement.namespaceURI is "namespace"
+PASS testDocument.doctype is null
+PASS doc = document.implementation.createDocument("namespace", "qualifiedName", docType) did not throw exception.
+PASS testDocument.__proto__ is window["XMLDocument"].prototype
+PASS testDocument.documentElement.tagName is "qualifiedName"
+PASS testDocument.documentElement.namespaceURI is "namespace"
+PASS testDocument.doctype is testDocType
+
+Document createHTMLDocument(optional DOMString title);
+PASS doc = document.implementation.createHTMLDocument() did not throw exception.
+PASS testDocument.__proto__ is window["HTMLDocument"].prototype
+PASS testDocument.documentElement.tagName is "HTML"
+PASS testDocument.documentElement.namespaceURI is "http://www.w3.org/1999/xhtml"
+PASS testDocument.doctype is testDocType
+PASS doc = document.implementation.createHTMLDocument("title") did not throw exception.
+PASS testDocument.__proto__ is window["HTMLDocument"].prototype
+PASS testDocument.documentElement.tagName is "HTML"
+PASS testDocument.documentElement.namespaceURI is "http://www.w3.org/1999/xhtml"
+PASS testDocument.doctype is testDocType
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
« no previous file with comments | « LayoutTests/fast/dom/implementation-api-args.html ('k') | LayoutTests/fast/dom/node-move-to-new-document-crash-main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698