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

Unified Diff: LayoutTests/fast/dom/custom/document-register-basic.html

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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/custom/document-register-basic.html
diff --git a/LayoutTests/fast/dom/custom/document-register-basic.html b/LayoutTests/fast/dom/custom/document-register-basic.html
index e2dddf711b5ea4a5d96dac72bfdd95092a256781..80b41245f69a67f5adfb77f7f1ca4b25f793e7e3 100644
--- a/LayoutTests/fast/dom/custom/document-register-basic.html
+++ b/LayoutTests/fast/dom/custom/document-register-basic.html
@@ -19,9 +19,9 @@ function createRegisterParamters()
}
// Invalid names
-shouldThrow("document.register('foo', createRegisterParamters())", "'Error: InvalidCharacterError: DOM Exception 5'");
-shouldThrow("document.register('xfoo', createRegisterParamters())", "'Error: InvalidCharacterError: DOM Exception 5'");
-shouldThrow("document.register('missing-glyph', createRegisterParamters())", "'Error: InvalidCharacterError: DOM Exception 5'");
+shouldThrow("document.register('foo', createRegisterParamters())", "'InvalidCharacterError: An invalid or illegal character was specified, such as in an XML name.'");
+shouldThrow("document.register('xfoo', createRegisterParamters())", "'InvalidCharacterError: An invalid or illegal character was specified, such as in an XML name.'");
+shouldThrow("document.register('missing-glyph', createRegisterParamters())", "'InvalidCharacterError: An invalid or illegal character was specified, such as in an XML name.'");
var fooConstructor = document.register("x-foo", createRegisterParamters());
shouldBe("typeof fooConstructor", "'function'");
@@ -29,15 +29,15 @@ shouldBe("fooConstructor.prototype.__proto__", "HTMLElement.prototype");
shouldBeTrue("fooConstructor.prototype.thisIsPrototype");
// Name conflicts
-shouldThrow("document.register('x-foo', createRegisterParamters())", "'Error: InvalidStateError: DOM Exception 11'");
-shouldThrow("document.register('X-FOO', createRegisterParamters())", "'Error: InvalidStateError: DOM Exception 11'");
+shouldThrow("document.register('x-foo', createRegisterParamters())", "'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.'");
+shouldThrow("document.register('X-FOO', createRegisterParamters())", "'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.'");
// Bad prototype: constructor property exists
-shouldThrow("document.register('x-bad-a', { prototype: HTMLElement.prototype })", "'Error: InvalidStateError: DOM Exception 11'");
+shouldThrow("document.register('x-bad-a', { prototype: HTMLElement.prototype })", "'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.'");
// Bad prototype: missing __proto__
-shouldThrow("document.register('x-bad-b', { prototype: {} })", "'Error: InvalidStateError: DOM Exception 11'");
+shouldThrow("document.register('x-bad-b', { prototype: {} })", "'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.'");
// Bad prototype: wrong __proto__
-shouldThrow("document.register('x-bad-c', { prototype: Object.create(Document.prototype) })", "'Error: InvalidStateError: DOM Exception 11'");
+shouldThrow("document.register('x-bad-c', { prototype: Object.create(Document.prototype) })", "'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.'");
// Call as function
shouldThrow("fooConstructor()", "'TypeError: DOM object constructor cannot be called as a function.'")

Powered by Google App Engine
This is Rietveld 408576698