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

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

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 7 years, 3 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.html
diff --git a/LayoutTests/fast/dom/implementation-api-args.html b/LayoutTests/fast/dom/implementation-api-args.html
index 5bb21673cd73730639c6c339179c2fd69010d91b..6778032c49881933d9a94445d5983fb3238c7322 100644
--- a/LayoutTests/fast/dom/implementation-api-args.html
+++ b/LayoutTests/fast/dom/implementation-api-args.html
@@ -35,9 +35,9 @@ function validateDocument(document, prototype, namespace, qualifiedName, docType
}
debug('\nDocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);');
-shouldThrow('document.implementation.createDocumentType()', "'TypeError: Not enough arguments'");
-shouldThrow('document.implementation.createDocumentType("qualifiedName")', "'TypeError: Not enough arguments'");
-shouldThrow('document.implementation.createDocumentType("qualifiedName", "publicId")', "'TypeError: Not enough arguments'");
+shouldThrow('document.implementation.createDocumentType()', '"TypeError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': 3 arguments required, but only 0 present."');
+shouldThrow('document.implementation.createDocumentType("qualifiedName")', '"TypeError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': 3 arguments required, but only 1 present."');
+shouldThrow('document.implementation.createDocumentType("qualifiedName", "publicId")', '"TypeError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': 3 arguments required, but only 2 present."');
var docType;
shouldNotThrow('docType = document.implementation.createDocumentType("qualifiedName", "publicId", "systemId")');
shouldBe('docType.__proto__', 'DocumentType.prototype');
@@ -46,8 +46,8 @@ shouldBeEqualToString('docType.publicId', 'publicId');
shouldBeEqualToString('docType.systemId', 'systemId');
debug('\nXMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, DocumentType? doctype);');
-shouldThrow('document.implementation.createDocument()', "'TypeError: Not enough arguments'");
-shouldThrow('document.implementation.createDocument("namespace")', "'TypeError: Not enough arguments'");
+shouldThrow('document.implementation.createDocument()', '"TypeError: Failed to execute \'createDocument\' on \'DOMImplementation\': 2 arguments required, but only 0 present."');
+shouldThrow('document.implementation.createDocument("namespace")', '"TypeError: Failed to execute \'createDocument\' on \'DOMImplementation\': 2 arguments required, but only 1 present."');
shouldNotThrow('document.implementation.createDocument("namespace", "qualifiedName")');
var doc;
shouldNotThrow('doc = document.implementation.createDocument("namespace", "qualifiedName", null)');
« no previous file with comments | « LayoutTests/fast/dom/document-all-tags-expected.txt ('k') | LayoutTests/fast/dom/implementation-api-args-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698