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

Unified Diff: LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js

Issue 98543011: Improve Document exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/DOMImplementation/script-tests/createDocumentType-err.js
diff --git a/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js b/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js
index 2032e0afa4d5d5969b949df47cd51845c57694a0..9575999fce4d4dac3583d3610ac6a04fb00bf0c9 100644
--- a/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js
+++ b/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js
@@ -14,15 +14,15 @@ shouldThrow("document.implementation.createDocumentType(null, null)", ExpectedNo
shouldThrow("document.implementation.createDocumentType(null, '')", ExpectedNotEnoughArgumentsMessage(2));
shouldThrow("document.implementation.createDocumentType('', null)", ExpectedNotEnoughArgumentsMessage(2));
shouldThrow("document.implementation.createDocumentType('', '')", ExpectedNotEnoughArgumentsMessage(2));
-shouldThrow("document.implementation.createDocumentType('a:', null, null)", "'NamespaceError: An attempt was made to create or change an object in a way which is incorrect with regard to namespaces.'");
-shouldThrow("document.implementation.createDocumentType(':foo', null, null)", "'NamespaceError: An attempt was made to create or change an object in a way which is incorrect with regard to namespaces.'");
-shouldThrow("document.implementation.createDocumentType(':', null, null)", "'NamespaceError: An attempt was made to create or change an object in a way which is incorrect with regard to namespaces.'");
+shouldThrow("document.implementation.createDocumentType('a:', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The specified name is empty."');
+shouldThrow("document.implementation.createDocumentType(':foo', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': A colon (\':\') may not be used to begin a name."');
+shouldThrow("document.implementation.createDocumentType(':', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': A colon (\':\') may not be used to begin a name."');
shouldNotThrow("document.implementation.createDocumentType('foo', null, null)");
shouldNotThrow("document.implementation.createDocumentType('foo:bar', null, null)");
-shouldThrow("document.implementation.createDocumentType('foo::bar', null, null)", "'NamespaceError: An attempt was made to create or change an object in a way which is incorrect with regard to namespaces.'");
-shouldThrow("document.implementation.createDocumentType('\t:bar', null, null)", "'InvalidCharacterError: The string contains invalid characters.'");
-shouldThrow("document.implementation.createDocumentType('foo:\t', null, null)", "'InvalidCharacterError: The string contains invalid characters.'");
-shouldThrow("document.implementation.createDocumentType('foo :bar', null, null)", "'InvalidCharacterError: The string contains invalid characters.'");
-shouldThrow("document.implementation.createDocumentType('foo: bar', null, null)", "'InvalidCharacterError: The string contains invalid characters.'");
-shouldThrow("document.implementation.createDocumentType('a:b:c', null, null)", "'NamespaceError: An attempt was made to create or change an object in a way which is incorrect with regard to namespaces.'");
+shouldThrow("document.implementation.createDocumentType('foo::bar', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': Multiple colons (\':\') are not allowed."');
+shouldThrow("document.implementation.createDocumentType('\t:bar', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The character \'\t\' may not be used to start a name."');
+shouldThrow("document.implementation.createDocumentType('foo:\t', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The character \'\t\' may not be used to start a name."');
+shouldThrow("document.implementation.createDocumentType('foo :bar', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The character \' \' may not be used in a name."');
+shouldThrow("document.implementation.createDocumentType('foo: bar', null, null)", '"InvalidCharacterError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': The character \' \' may not be used to start a name."');
+shouldThrow("document.implementation.createDocumentType('a:b:c', null, null)", '"NamespaceError: Failed to execute \'createDocumentType\' on \'DOMImplementation\': Multiple colons (\':\') are not allowed."');

Powered by Google App Engine
This is Rietveld 408576698