DOMException should not have its own toString()
https://bugs.webkit.org/show_bug.cgi?id=174630
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
Rebaseline existing tests now that more checks are passing.
* web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any-expected.txt:
* web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker-expected.txt:
Source/WebCore:
DOMException should not have its own toString() and should use the one from Error.prototype.toString()
instead:
- https://heycam.github.io/webidl/#idl-DOMException
No new tests, rebaselined existing tests.
* dom/DOMCoreException.idl:
LayoutTests:
Rebaseline existing tests as the exception string is now slightly different.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/dom/Attr/cannot-have-children-expected.txt b/LayoutTests/fast/dom/Attr/cannot-have-children-expected.txt
index bf70d8a..da926b8 100644
--- a/LayoutTests/fast/dom/Attr/cannot-have-children-expected.txt
+++ b/LayoutTests/fast/dom/Attr/cannot-have-children-expected.txt
@@ -15,8 +15,8 @@
PASS idAttr.value is "test"
PASS idAttr.nodeValue is "test"
PASS idAttr.textContent is "test"
-PASS idAttr.appendChild(text) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS idAttr.insertBefore(text, null) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS idAttr.appendChild(text) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS idAttr.insertBefore(text, null) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS detachedAttr.name is "foo"
PASS detachedAttr.localName is "foo"
@@ -29,8 +29,8 @@
PASS detachedAttr.lastChild is null
PASS detachedAttr.hasChildNodes() is false
PASS detachedAttr.childNodes.length is 0
-PASS detachedAttr.appendChild(text) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS detachedAttr.insertBefore(text, null) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS detachedAttr.appendChild(text) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS detachedAttr.insertBefore(text, null) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
detachedAttr.value = 'bar'
PASS detachedAttr.value is "bar"
@@ -73,8 +73,8 @@
PASS fooAttr.lastChild is null
PASS fooAttr.hasChildNodes() is false
PASS fooAttr.childNodes.length is 0
-PASS fooAttr.appendChild(text) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS fooAttr.insertBefore(text, null) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS fooAttr.appendChild(text) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS fooAttr.insertBefore(text, null) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/dom/Attr/only-attach-attr-once-expected.txt b/LayoutTests/fast/dom/Attr/only-attach-attr-once-expected.txt
index 1145797..c5f5a0e 100644
--- a/LayoutTests/fast/dom/Attr/only-attach-attr-once-expected.txt
+++ b/LayoutTests/fast/dom/Attr/only-attach-attr-once-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS div.setAttributeNodeNS(src) threw exception InUseAttributeError (DOM Exception 10): The attribute is in use..
+PASS div.setAttributeNodeNS(src) threw exception InUseAttributeError: The attribute is in use..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Attr/only-attach-attr-once.html b/LayoutTests/fast/dom/Attr/only-attach-attr-once.html
index 856b045..6ad40d1 100644
--- a/LayoutTests/fast/dom/Attr/only-attach-attr-once.html
+++ b/LayoutTests/fast/dom/Attr/only-attach-attr-once.html
@@ -10,7 +10,7 @@
window.callback = () => {
window.callback = null;
- shouldThrow("div.setAttributeNodeNS(src)", "'InUseAttributeError (DOM Exception 10): The attribute is in use.'");
+ shouldThrowErrorName("div.setAttributeNodeNS(src)", "InUseAttributeError");
frame.setAttributeNodeNS(document.createAttribute('src'));
};
diff --git a/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt b/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt
index 09a1c9f..5c8f6cd 100644
--- a/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt
+++ b/LayoutTests/fast/dom/DOMException/prototype-object-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS e.toString() is "HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree."
+PASS e.toString() is "HierarchyRequestError: The operation would yield an incorrect node tree."
PASS Object.prototype.toString.call(e) is "[object DOMException]"
PASS Object.prototype.toString.call(e.__proto__) is "[object DOMExceptionPrototype]"
PASS Object.prototype.toString.call(e.__proto__.__proto__) is "[object Object]"
diff --git a/LayoutTests/fast/dom/DOMException/prototype-object.html b/LayoutTests/fast/dom/DOMException/prototype-object.html
index 8a70413..4d0f0ea 100644
--- a/LayoutTests/fast/dom/DOMException/prototype-object.html
+++ b/LayoutTests/fast/dom/DOMException/prototype-object.html
@@ -12,7 +12,7 @@
e = err;
}
-shouldBeEqualToString("e.toString()", "HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.");
+shouldBeEqualToString("e.toString()", "HierarchyRequestError: The operation would yield an incorrect node tree.");
shouldBeEqualToString("Object.prototype.toString.call(e)", "[object DOMException]");
shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object DOMExceptionPrototype]");
shouldBeEqualToString("Object.prototype.toString.call(e.__proto__.__proto__)", "[object Object]");
diff --git a/LayoutTests/fast/dom/Document/createElement-invalid-names-expected.txt b/LayoutTests/fast/dom/Document/createElement-invalid-names-expected.txt
index 6702224..1e5db22 100644
--- a/LayoutTests/fast/dom/Document/createElement-invalid-names-expected.txt
+++ b/LayoutTests/fast/dom/Document/createElement-invalid-names-expected.txt
@@ -3,18 +3,18 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.createElement('0ascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('.Ascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('-Ascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement(' ascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement(' ascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('֑sc.ii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('⃣scii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('िascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('ʳascii') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('asc i') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('asc i') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS document.createElement('asciiⅦ') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS document.createElement('0ascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('.Ascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('-Ascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement(' ascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement(' ascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('֑sc.ii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('⃣scii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('िascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('ʳascii') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('asc i') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('asc i') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS document.createElement('asciiⅦ') threw exception InvalidCharacterError: The string contains invalid characters..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Document/createElement-invalid-names.html b/LayoutTests/fast/dom/Document/createElement-invalid-names.html
index bc18235..15556f5 100644
--- a/LayoutTests/fast/dom/Document/createElement-invalid-names.html
+++ b/LayoutTests/fast/dom/Document/createElement-invalid-names.html
@@ -26,7 +26,7 @@
];
for (var i in nameList)
- shouldThrow("document.createElement('" + nameList[i] +"')", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+ shouldThrowErrorName("document.createElement('" + nameList[i] +"')", "InvalidCharacterError");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception-expected.txt b/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception-expected.txt
index 3b293ac..2ef8daa 100644
--- a/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception-expected.txt
+++ b/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.domain = "apple.com" threw exception SecurityError (DOM Exception 18): The operation is insecure..
+PASS document.domain = "apple.com" threw exception SecurityError: The operation is insecure..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception.html b/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception.html
index d3a5e71..625736c 100644
--- a/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception.html
+++ b/LayoutTests/fast/dom/Document/invalid-domain-change-throws-exception.html
@@ -7,7 +7,7 @@
<script>
description("This test checks that a SECURITY_ERR exception is raised if an attempt is made to change document.domain to an invalid value.");
-shouldThrow('document.domain = "apple.com"', '"SecurityError (DOM Exception 18): The operation is insecure."');
+shouldThrowErrorName('document.domain = "apple.com"', 'SecurityError');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Document/replace-child-expected.txt b/LayoutTests/fast/dom/Document/replace-child-expected.txt
index b1d6dcd..4d3569f 100644
--- a/LayoutTests/fast/dom/Document/replace-child-expected.txt
+++ b/LayoutTests/fast/dom/Document/replace-child-expected.txt
@@ -12,7 +12,7 @@
<!DOCTYPE html><div/>
replacing element with multiple elements in fragment
-PASS doc.replaceChild(fragment, doc.documentElement); threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.replaceChild(fragment, doc.documentElement); threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
<!DOCTYPE html><body/>
replacing element with doctype
@@ -20,7 +20,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
replacing element with doctype when a doctype already exists
-PASS doc.replaceChild(newChild, doc.documentElement) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.replaceChild(newChild, doc.documentElement) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
<!DOCTYPE html><body/>
replacing doctype with doctype
@@ -32,7 +32,7 @@
<bar/>
replacing element with doctype when an element already exists
-PASS doc.replaceChild(newChild, doc.documentElement) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.replaceChild(newChild, doc.documentElement) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
<!DOCTYPE html><body/>
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/dom/Element/class-list-toggle-expected.txt b/LayoutTests/fast/dom/Element/class-list-toggle-expected.txt
index 0bb0e68..4bbce4c 100644
--- a/LayoutTests/fast/dom/Element/class-list-toggle-expected.txt
+++ b/LayoutTests/fast/dom/Element/class-list-toggle-expected.txt
@@ -7,14 +7,14 @@
PASS div.classList.toggle() threw exception TypeError: Not enough arguments.
* Token is an empty string
-PASS div.classList.toggle('') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS div.classList.toggle('') threw exception SyntaxError: The string did not match the expected pattern..
Token contains an ASCII white space
-PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError: The string contains invalid characters..
+PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError: The string contains invalid characters..
+PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError: The string contains invalid characters..
+PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError: The string contains invalid characters..
+PASS div.classList.toggle(stringWithSpace) threw exception InvalidCharacterError: The string contains invalid characters..
* 'force' parameter omitted, token does not exist
div.classList.toggle('a')
diff --git a/LayoutTests/fast/dom/Element/class-list-toggle.html b/LayoutTests/fast/dom/Element/class-list-toggle.html
index a0e2de0..aec5203 100644
--- a/LayoutTests/fast/dom/Element/class-list-toggle.html
+++ b/LayoutTests/fast/dom/Element/class-list-toggle.html
@@ -15,20 +15,20 @@
debug("");
debug("* Token is an empty string");
-shouldThrow("div.classList.toggle('')", "'SyntaxError (DOM Exception 12): The string did not match the expected pattern.'");
+shouldThrowErrorName("div.classList.toggle('')", "SyntaxError");
debug("");
debug("Token contains an ASCII white space");
var stringWithSpace = "a b";
-shouldThrow("div.classList.toggle(stringWithSpace)", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("div.classList.toggle(stringWithSpace)", "InvalidCharacterError");
stringWithSpace = "a\nb";
-shouldThrow("div.classList.toggle(stringWithSpace)", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("div.classList.toggle(stringWithSpace)", "InvalidCharacterError");
stringWithSpace = "a\tb";
-shouldThrow("div.classList.toggle(stringWithSpace)", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("div.classList.toggle(stringWithSpace)", "InvalidCharacterError");
stringWithSpace = "a\rb";
-shouldThrow("div.classList.toggle(stringWithSpace)", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("div.classList.toggle(stringWithSpace)", "InvalidCharacterError");
stringWithSpace = "a\fb";
-shouldThrow("div.classList.toggle(stringWithSpace)", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("div.classList.toggle(stringWithSpace)", "InvalidCharacterError");
debug("");
debug("* 'force' parameter omitted, token does not exist");
diff --git a/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors-expected.txt b/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors-expected.txt
index 1725d1d..74ed908 100644
--- a/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors-expected.txt
+++ b/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors-expected.txt
@@ -3,10 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS div.insertAdjacentHTML('beforeBegin', 'text') threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS div.insertAdjacentHTML('afterEnd', 'text') threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS div.insertAdjacentHTML('FOO', 'text') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS document.documentElement.insertAdjacentHTML('afterEnd', 'text') threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
+PASS div.insertAdjacentHTML('beforeBegin', 'text') threw exception NoModificationAllowedError: The object can not be modified..
+PASS div.insertAdjacentHTML('afterEnd', 'text') threw exception NoModificationAllowedError: The object can not be modified..
+PASS div.insertAdjacentHTML('FOO', 'text') threw exception SyntaxError: The string did not match the expected pattern..
+PASS document.documentElement.insertAdjacentHTML('afterEnd', 'text') threw exception NoModificationAllowedError: The object can not be modified..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html b/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html
index 3e67f35..9a6cc57 100644
--- a/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html
+++ b/LayoutTests/fast/dom/HTMLElement/insertAdjacentHTML-errors.html
@@ -12,8 +12,8 @@
shouldThrow("div.insertAdjacentHTML('beforeBegin', 'text')");
shouldThrow("div.insertAdjacentHTML('afterEnd', 'text')");
-shouldThrow("div.insertAdjacentHTML('FOO', 'text')", '"SyntaxError (DOM Exception 12): The string did not match the expected pattern."');
-shouldThrow("document.documentElement.insertAdjacentHTML('afterEnd', 'text')", '"NoModificationAllowedError (DOM Exception 7): The object can not be modified."');
+shouldThrowErrorName("div.insertAdjacentHTML('FOO', 'text')", 'SyntaxError');
+shouldThrowErrorName("document.documentElement.insertAdjacentHTML('afterEnd', 'text')", 'NoModificationAllowedError');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/HTMLElement/set-invalid-value-expected.txt b/LayoutTests/fast/dom/HTMLElement/set-invalid-value-expected.txt
index a36d068..75620b1 100644
--- a/LayoutTests/fast/dom/HTMLElement/set-invalid-value-expected.txt
+++ b/LayoutTests/fast/dom/HTMLElement/set-invalid-value-expected.txt
@@ -3,12 +3,12 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.getElementById('div').contentEditable = 'abc' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS document.getElementById('div').contentEditable = 'abc' threw exception SyntaxError: The string did not match the expected pattern..
PASS document.getElementById("div").getAttribute("contentEditable") is "true"
PASS document.getElementById("div").contentEditable is "true"
PASS document.getElementById("div").isContentEditable is true
PASS window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify") is "read-write"
-PASS document.getElementById('div').contentEditable = '' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS document.getElementById('div').contentEditable = '' threw exception SyntaxError: The string did not match the expected pattern..
PASS document.getElementById("div").getAttribute("contentEditable") is "true"
PASS document.getElementById("div").contentEditable is "true"
PASS document.getElementById("div").isContentEditable is true
diff --git a/LayoutTests/fast/dom/HTMLElement/set-invalid-value.html b/LayoutTests/fast/dom/HTMLElement/set-invalid-value.html
index 5b49f78..7b9f3d8 100644
--- a/LayoutTests/fast/dom/HTMLElement/set-invalid-value.html
+++ b/LayoutTests/fast/dom/HTMLElement/set-invalid-value.html
@@ -11,13 +11,13 @@
<script>
description('When contentEditable is set to invalid string, SYNTAX_ERR exception (code: 12) must be raised.')
-shouldThrow("document.getElementById('div').contentEditable = 'abc'", '"SyntaxError (DOM Exception 12): The string did not match the expected pattern."');
+shouldThrowErrorName("document.getElementById('div').contentEditable = 'abc'", 'SyntaxError');
shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true"');
shouldBe('document.getElementById("div").contentEditable', '"true"');
shouldBe('document.getElementById("div").isContentEditable', 'true');
shouldBe('window.getComputedStyle(div, "").getPropertyValue("-webkit-user-modify")', '"read-write"');
-shouldThrow("document.getElementById('div').contentEditable = ''", '"SyntaxError (DOM Exception 12): The string did not match the expected pattern."');
+shouldThrowErrorName("document.getElementById('div').contentEditable = ''", 'SyntaxError');
shouldBe('document.getElementById("div").getAttribute("contentEditable")','"true"');
shouldBe('document.getElementById("div").contentEditable', '"true"');
shouldBe('document.getElementById("div").isContentEditable', 'true');
diff --git a/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute-expected.txt b/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute-expected.txt
index cf1cc23..0cff8cc 100644
--- a/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute-expected.txt
+++ b/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute-expected.txt
@@ -13,7 +13,7 @@
PASS input.removeAttribute('size'); input.size is 20
PASS input.setAttribute('size', '0'); input.size is 20
PASS input.setAttribute('size', '10'); input.size is 10
-PASS input.size = 0 threw exception IndexSizeError (DOM Exception 1): The index is not in the allowed range..
+PASS input.size = 0 threw exception IndexSizeError: The index is not in the allowed range..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute.html b/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute.html
index d3e2855..46d8c2e 100644
--- a/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute.html
+++ b/LayoutTests/fast/dom/HTMLInputElement/input-size-attribute.html
@@ -23,7 +23,7 @@
shouldBe("input.setAttribute('size', '0'); input.size", "20");
shouldBe("input.setAttribute('size', '10'); input.size", "10");
-shouldThrow("input.size = 0", "'IndexSizeError (DOM Exception 1): The index is not in the allowed range.'");
+shouldThrowErrorName("input.size = 0", "IndexSizeError");
</script>
</body>
diff --git a/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt b/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt
index 1da02d6..5dc794c 100644
--- a/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt
+++ b/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt
@@ -22,7 +22,7 @@
PASS testAdd(createOption("Y11"), mySelect.options[1]) is "0,Y11,1,Y10,2"
PASS testAddWithoutResettingListOptions(createGroup("Y12", "Y13"), mySelect.options[1]) is "0,Y12,Y13,1,2"
PASS testAdd(createGroup("Y14", "Y15"), mySelect.options[3]) is "0,Y12,Y13,Y14,Y15,1,2"
-PASS testAdd(createOption("Y16"), createOption("Y17")) threw exception NotFoundError (DOM Exception 8): The object can not be found here..
+PASS testAdd(createOption("Y16"), createOption("Y17")) threw exception NotFoundError: The object can not be found here..
PASS testAdd(createOption("Y1")) is "0,1,2,Y1"
PASS testAdd(createOption("Y2"), null) is "0,1,2,Y2"
PASS testAdd(createOption("Y3"), 0) is "Y3,0,1,2"
diff --git a/LayoutTests/fast/dom/HTMLSelectElement/select-add-optgroup-expected.txt b/LayoutTests/fast/dom/HTMLSelectElement/select-add-optgroup-expected.txt
index 27c0036..46eab60 100644
--- a/LayoutTests/fast/dom/HTMLSelectElement/select-add-optgroup-expected.txt
+++ b/LayoutTests/fast/dom/HTMLSelectElement/select-add-optgroup-expected.txt
@@ -16,7 +16,7 @@
PASS testAdd2(createGroup("Y12", "Y13"), mySelect.options[1]) is "0,Y12,Y13,1,2"
PASS testAdd2(createGroup("Y14", "Y15"), mySelect.options[3]) is "0,Y12,Y13,Y14,Y15,1,2"
list elements are = 0,1,2
-PASS testAdd2(createOption("Y16"), createOption("Y17")) threw exception NotFoundError (DOM Exception 8): The object can not be found here..
+PASS testAdd2(createOption("Y16"), createOption("Y17")) threw exception NotFoundError: The object can not be found here..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes-expected.txt b/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes-expected.txt
index 94f93b4..75ad447 100644
--- a/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes-expected.txt
+++ b/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes-expected.txt
@@ -27,7 +27,7 @@
PASS table.tHead is thead
PASS table.tHead = document.body threw exception TypeError: The HTMLTableElement.tHead attribute must be an instance of HTMLTableSectionElement.
PASS table.tHead is thead
-PASS table.tHead = tfoot threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS table.tHead = tfoot threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS table.tHead is thead
table.tHead = null
PASS table.tHead is null
@@ -42,7 +42,7 @@
PASS table.tFoot is tfoot
PASS table.tFoot = document.body threw exception TypeError: The HTMLTableElement.tFoot attribute must be an instance of HTMLTableSectionElement.
PASS table.tFoot is tfoot
-PASS table.tFoot = thead threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS table.tFoot = thead threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS table.tFoot is tfoot
table.tFoot = null
PASS table.tFoot is null
diff --git a/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes.html b/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes.html
index 88cf02d..e472454 100644
--- a/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes.html
+++ b/LayoutTests/fast/dom/HTMLTableElement/nullable-attributes.html
@@ -35,7 +35,7 @@
shouldBe("table.tHead", "thead");
shouldThrow("table.tHead = document.body", "'TypeError: The HTMLTableElement.tHead attribute must be an instance of HTMLTableSectionElement'");
shouldBe("table.tHead", "thead");
-shouldThrow("table.tHead = tfoot", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("table.tHead = tfoot", "HierarchyRequestError");
shouldBe("table.tHead", "thead");
evalAndLog("table.tHead = null");
shouldBeNull("table.tHead");
@@ -51,7 +51,7 @@
shouldBe("table.tFoot", "tfoot");
shouldThrow("table.tFoot = document.body", "'TypeError: The HTMLTableElement.tFoot attribute must be an instance of HTMLTableSectionElement'");
shouldBe("table.tFoot", "tfoot");
-shouldThrow("table.tFoot = thead", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("table.tFoot = thead", "HierarchyRequestError");
shouldBe("table.tFoot", "tfoot");
evalAndLog("table.tFoot = null");
shouldBeNull("table.tFoot");
diff --git a/LayoutTests/fast/dom/HTMLTemplateElement/cycles-expected.txt b/LayoutTests/fast/dom/HTMLTemplateElement/cycles-expected.txt
index dc07d35..4b2b1b0 100644
--- a/LayoutTests/fast/dom/HTMLTemplateElement/cycles-expected.txt
+++ b/LayoutTests/fast/dom/HTMLTemplateElement/cycles-expected.txt
@@ -3,11 +3,11 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS template.content.appendChild(template) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS template.content.appendChild(outerDiv) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS innerDiv.appendChild(template) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS innerDiv.appendChild(outerDiv) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS innerTemplate.appendChild(outerDiv) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS template.content.appendChild(template) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS template.content.appendChild(outerDiv) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS innerDiv.appendChild(template) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS innerDiv.appendChild(outerDiv) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS innerTemplate.appendChild(outerDiv) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Node/initial-values-expected.txt b/LayoutTests/fast/dom/Node/initial-values-expected.txt
index dd71ffe..ce53f9f 100644
--- a/LayoutTests/fast/dom/Node/initial-values-expected.txt
+++ b/LayoutTests/fast/dom/Node/initial-values-expected.txt
@@ -41,7 +41,7 @@
PASS comment.prefix is undefined.
PASS comment.nodeValue is 'foo'
PASS comment.data is 'foo'
-PASS document.createCDATASection('foo') threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS document.createCDATASection('foo') threw exception NotSupportedError: The operation is not supported..
PASS cdata.nodeName is '#cdata-section'
PASS cdata.localName is undefined.
PASS cdata.namespaceURI is undefined.
diff --git a/LayoutTests/fast/dom/Node/replaceChild-notFoundError-expected.txt b/LayoutTests/fast/dom/Node/replaceChild-notFoundError-expected.txt
index 7f46880..e717e48 100644
--- a/LayoutTests/fast/dom/Node/replaceChild-notFoundError-expected.txt
+++ b/LayoutTests/fast/dom/Node/replaceChild-notFoundError-expected.txt
@@ -3,8 +3,8 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS div1.replaceChild(newNode, div2) threw exception NotFoundError (DOM Exception 8): The object can not be found here..
-PASS div1.replaceChild(div2, div2) threw exception NotFoundError (DOM Exception 8): The object can not be found here..
+PASS div1.replaceChild(newNode, div2) threw exception NotFoundError: The object can not be found here..
+PASS div1.replaceChild(div2, div2) threw exception NotFoundError: The object can not be found here..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/ParentNode-append-expected.txt b/LayoutTests/fast/dom/ParentNode-append-expected.txt
index 4709a4b..b7806f5 100644
--- a/LayoutTests/fast/dom/ParentNode-append-expected.txt
+++ b/LayoutTests/fast/dom/ParentNode-append-expected.txt
@@ -50,7 +50,7 @@
PASS container.childNodes.length is 0
Test error condition of self-appending.
-PASS container.append(container) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS container.append(container) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
Test DocumentFragment.append((Node or DOMString)...).
PASS d1.parentNode is fragment
@@ -65,10 +65,10 @@
PASS c1.parentNode is doc
Test error condition appending a second root element.
-PASS doc.append(d2) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.append(d2) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
Test error condition appending Text node as the root element.
-PASS doc.append('hello') threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.append('hello') threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/ParentNode-prepend-expected.txt b/LayoutTests/fast/dom/ParentNode-prepend-expected.txt
index a6a05f9..1c4223c 100644
--- a/LayoutTests/fast/dom/ParentNode-prepend-expected.txt
+++ b/LayoutTests/fast/dom/ParentNode-prepend-expected.txt
@@ -50,7 +50,7 @@
PASS container.childNodes.length is 0
Test error condition of self-prepending.
-PASS container.prepend(container) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS container.prepend(container) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
Test DocumentFragment.prepend((Node or DOMString)...).
PASS d1.parentNode is fragment
@@ -65,10 +65,10 @@
PASS c1.parentNode is doc
Test error condition prepending a second root element.
-PASS doc.prepend(d2) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.prepend(d2) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
Test error condition prepending Text node as the root element.
-PASS doc.prepend('hello') threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS doc.prepend('hello') threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/31684-expected.txt b/LayoutTests/fast/dom/Range/31684-expected.txt
index 8c614ed..44911a4 100644
--- a/LayoutTests/fast/dom/Range/31684-expected.txt
+++ b/LayoutTests/fast/dom/Range/31684-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS range.surroundContents(element) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS range.surroundContents(element) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/31684.html b/LayoutTests/fast/dom/Range/31684.html
index f62c3be..0516f5f 100644
--- a/LayoutTests/fast/dom/Range/31684.html
+++ b/LayoutTests/fast/dom/Range/31684.html
@@ -14,7 +14,7 @@
var element = document.createElement("div");
range.selectNodeContents(text);
-shouldThrow("range.surroundContents(element)", '"HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree."');
+shouldThrowErrorName("range.surroundContents(element)", 'HierarchyRequestError');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Range/clone-contents-document-type-expected.txt b/LayoutTests/fast/dom/Range/clone-contents-document-type-expected.txt
index f5cbd4d..2ea70b9 100644
--- a/LayoutTests/fast/dom/Range/clone-contents-document-type-expected.txt
+++ b/LayoutTests/fast/dom/Range/clone-contents-document-type-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS range.cloneContents() threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS range.cloneContents() threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/clone-contents-document-type.html b/LayoutTests/fast/dom/Range/clone-contents-document-type.html
index 22d6ed7..a4e22a7 100644
--- a/LayoutTests/fast/dom/Range/clone-contents-document-type.html
+++ b/LayoutTests/fast/dom/Range/clone-contents-document-type.html
@@ -9,7 +9,7 @@
range.setStart(document, 0);
range.setEnd(document, 2);
-shouldThrow("range.cloneContents()", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("range.cloneContents()", "HierarchyRequestError");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Range/compareBoundaryPoints-1.html b/LayoutTests/fast/dom/Range/compareBoundaryPoints-1.html
index 3ffc344..9c2aae0 100644
--- a/LayoutTests/fast/dom/Range/compareBoundaryPoints-1.html
+++ b/LayoutTests/fast/dom/Range/compareBoundaryPoints-1.html
@@ -32,7 +32,7 @@
var compare = r1.compareBoundaryPoints(Range.START_TO_START, r2);
log("Error. compareBoundaryPoints should have thrown an exception.");
} catch (e) {
- var expected = "WrongDocumentError (DOM Exception 4): The object is in the wrong document.";
+ var expected = "WrongDocumentError: The object is in the wrong document.";
if (e != expected)
log("Error. Exception thrown should have been: " + expected);
}
diff --git a/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt b/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt
index 00672c1..5fb5d76 100644
--- a/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt
+++ b/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception-expected.txt
@@ -8,10 +8,10 @@
PASS range.compareBoundaryPoints(Range.END_TO_END, sourceRange) is -1
PASS range.compareBoundaryPoints(Range.END_TO_START, sourceRange) is -1
PASS range.compareBoundaryPoints(65536, sourceRange) is -1
-PASS range.compareBoundaryPoints(-1, sourceRange) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
-PASS range.compareBoundaryPoints(4, sourceRange) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
-PASS range.compareBoundaryPoints(100, sourceRange) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
-PASS range.compareBoundaryPoints(65535, sourceRange) threw exception NotSupportedError (DOM Exception 9): The operation is not supported..
+PASS range.compareBoundaryPoints(-1, sourceRange) threw exception NotSupportedError: The operation is not supported..
+PASS range.compareBoundaryPoints(4, sourceRange) threw exception NotSupportedError: The operation is not supported..
+PASS range.compareBoundaryPoints(100, sourceRange) threw exception NotSupportedError: The operation is not supported..
+PASS range.compareBoundaryPoints(65535, sourceRange) threw exception NotSupportedError: The operation is not supported..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception.html b/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception.html
index 35f6b3f..7495a67 100644
--- a/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception.html
+++ b/LayoutTests/fast/dom/Range/compareBoundaryPoints-compareHow-exception.html
@@ -20,10 +20,10 @@
shouldBe("range.compareBoundaryPoints(65536, sourceRange)", "-1"); // 65536 should wrap around to 0.
// Invalid values.
-shouldThrow("range.compareBoundaryPoints(-1, sourceRange)", "'NotSupportedError (DOM Exception 9): The operation is not supported.'");
-shouldThrow("range.compareBoundaryPoints(4, sourceRange)", "'NotSupportedError (DOM Exception 9): The operation is not supported.'");
-shouldThrow("range.compareBoundaryPoints(100, sourceRange)", "'NotSupportedError (DOM Exception 9): The operation is not supported.'");
-shouldThrow("range.compareBoundaryPoints(65535, sourceRange)", "'NotSupportedError (DOM Exception 9): The operation is not supported.'");
+shouldThrowErrorName("range.compareBoundaryPoints(-1, sourceRange)", "NotSupportedError");
+shouldThrowErrorName("range.compareBoundaryPoints(4, sourceRange)", "NotSupportedError");
+shouldThrowErrorName("range.compareBoundaryPoints(100, sourceRange)", "NotSupportedError");
+shouldThrowErrorName("range.compareBoundaryPoints(65535, sourceRange)", "NotSupportedError");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Range/extract-contents-document-type-expected.txt b/LayoutTests/fast/dom/Range/extract-contents-document-type-expected.txt
index 2aaad7f..5b3cd4c 100644
--- a/LayoutTests/fast/dom/Range/extract-contents-document-type-expected.txt
+++ b/LayoutTests/fast/dom/Range/extract-contents-document-type-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS range.extractContents() threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS range.extractContents() threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/extract-contents-document-type.html b/LayoutTests/fast/dom/Range/extract-contents-document-type.html
index 89011f6..0580128 100644
--- a/LayoutTests/fast/dom/Range/extract-contents-document-type.html
+++ b/LayoutTests/fast/dom/Range/extract-contents-document-type.html
@@ -9,7 +9,7 @@
range.setStart(document, 0);
range.setEnd(document, 2);
-shouldThrow("range.extractContents()", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("range.extractContents()", "HierarchyRequestError");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes-expected.txt b/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes-expected.txt
index 092e873..a1f7ccd 100644
--- a/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes-expected.txt
+++ b/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes-expected.txt
@@ -9,8 +9,8 @@
PASS var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedDiv2, 0); is 1
PASS var range = new Range; range.setStart(spanInDetachedDiv2, 0); range.comparePoint(spanInDetachedDiv1, 0); is -1
PASS var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedDiv1, 0); is 0
-PASS var range = new Range; range.setStart(detachedDiv, 0); range.comparePoint(detachedP, 0); threw exception WrongDocumentError (DOM Exception 4): The object is in the wrong document..
-PASS var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedP, 0); threw exception WrongDocumentError (DOM Exception 4): The object is in the wrong document..
+PASS var range = new Range; range.setStart(detachedDiv, 0); range.comparePoint(detachedP, 0); threw exception WrongDocumentError: The object is in the wrong document..
+PASS var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedP, 0); threw exception WrongDocumentError: The object is in the wrong document..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes.html b/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes.html
index 3369be4..d686ff0 100644
--- a/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes.html
+++ b/LayoutTests/fast/dom/Range/range-comparePoint-detached-nodes.html
@@ -22,8 +22,8 @@
shouldBe("var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedDiv2, 0);", "1");
shouldBe("var range = new Range; range.setStart(spanInDetachedDiv2, 0); range.comparePoint(spanInDetachedDiv1, 0);", "-1");
shouldBe("var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedDiv1, 0);", "0");
-shouldThrow("var range = new Range; range.setStart(detachedDiv, 0); range.comparePoint(detachedP, 0);", "'WrongDocumentError (DOM Exception 4): The object is in the wrong document.'");
-shouldThrow("var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedP, 0);", "'WrongDocumentError (DOM Exception 4): The object is in the wrong document.'");
+shouldThrowErrorName("var range = new Range; range.setStart(detachedDiv, 0); range.comparePoint(detachedP, 0);", "WrongDocumentError");
+shouldThrowErrorName("var range = new Range; range.setStart(spanInDetachedDiv1, 0); range.comparePoint(spanInDetachedP, 0);", "WrongDocumentError");
var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/Range/range-exceptions-expected.txt b/LayoutTests/fast/dom/Range/range-exceptions-expected.txt
index d13c6c2..f569bfe 100644
--- a/LayoutTests/fast/dom/Range/range-exceptions-expected.txt
+++ b/LayoutTests/fast/dom/Range/range-exceptions-expected.txt
@@ -4,8 +4,8 @@
PASS node.innerHTML is '<bar>AB<moo>C</moo>DE</bar>'
-PASS r.surroundContents(document.createElement('a')) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
-PASS r.surroundContents(document.createElement('a')) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS r.surroundContents(document.createElement('a')) threw exception InvalidStateError: The object is in an invalid state..
+PASS r.surroundContents(document.createElement('a')) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/Range/range-exceptions.html b/LayoutTests/fast/dom/Range/range-exceptions.html
index d30d1c1..63201cd 100644
--- a/LayoutTests/fast/dom/Range/range-exceptions.html
+++ b/LayoutTests/fast/dom/Range/range-exceptions.html
@@ -23,12 +23,12 @@
var r = document.createRange();
r.setStart(c1, 2);
r.setEnd(c2, 3);
-shouldThrow("r.surroundContents(document.createElement('a'))", '"InvalidStateError (DOM Exception 11): The object is in an invalid state."');
+shouldThrowErrorName("r.surroundContents(document.createElement('a'))", 'InvalidStateError');
// But not when we don't try to split the comment.
r.setStart(c1, 0);
r.setEnd(c1, 5);
-shouldThrow("r.surroundContents(document.createElement('a'))", '"HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree."');
+shouldThrowErrorName("r.surroundContents(document.createElement('a'))", 'HierarchyRequestError');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
diff --git a/LayoutTests/fast/dom/Range/range-intersectsNode-expected.txt b/LayoutTests/fast/dom/Range/range-intersectsNode-expected.txt
index bea4f0a..980700b 100644
--- a/LayoutTests/fast/dom/Range/range-intersectsNode-expected.txt
+++ b/LayoutTests/fast/dom/Range/range-intersectsNode-expected.txt
@@ -53,7 +53,7 @@
PASS range.intersectsNode(document) is true
2.4 Range has no parent
-PASS range.selectNode(document) threw exception InvalidNodeTypeError (DOM Exception 24): The supplied node is incorrect or has an incorrect ancestor for this operation..
+PASS range.selectNode(document) threw exception InvalidNodeTypeError: The supplied node is incorrect or has an incorrect ancestor for this operation..
2.5 Wrong documents
PASS intersects is false
diff --git a/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt b/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt
index 7ce49ed..047532c 100644
--- a/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt
+++ b/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS range.surroundContents(select) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS range.surroundContents(select) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS range.surroundContents(insert) did not throw exception.
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt
index f5be5f1..3074741 100644
--- a/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt
+++ b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection-expected.txt
@@ -3,8 +3,8 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS sel.collapseToStart() threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
-PASS sel.collapseToEnd() threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
+PASS sel.collapseToStart() threw exception InvalidStateError: The object is in an invalid state..
+PASS sel.collapseToEnd() threw exception InvalidStateError: The object is in an invalid state..
PASS sel.collapseToStart() is undefined
PASS sel.collapseToEnd() is undefined
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
index 6b79cb31..3947e09 100644
--- a/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
+++ b/LayoutTests/fast/dom/Selection/collapseToX-empty-selection.html
@@ -11,8 +11,8 @@
var textNode = document.createTextNode("abcdef");
document.body.appendChild(textNode);
-shouldThrow("sel.collapseToStart()", "'InvalidStateError (DOM Exception 11): The object is in an invalid state.'");
-shouldThrow("sel.collapseToEnd()", "'InvalidStateError (DOM Exception 11): The object is in an invalid state.'");
+shouldThrowErrorName("sel.collapseToStart()", "InvalidStateError");
+shouldThrowErrorName("sel.collapseToEnd()", "InvalidStateError");
sel.selectAllChildren(textNode);
diff --git a/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-almost-strict-expected.txt b/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-almost-strict-expected.txt
index de3bc1e..522d62a 100644
--- a/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-almost-strict-expected.txt
+++ b/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-almost-strict-expected.txt
@@ -12,8 +12,8 @@
[object HTMLDivElement], [object HTMLDivElement], length: 2
[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 4
[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 5
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
length: 0
length: 0
[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], length: 4
@@ -26,8 +26,8 @@
[object HTMLDivElement], [object HTMLDivElement], length: 2
[object HTMLDivElement], [object HTMLParagraphElement], length: 2
[object HTMLDivElement], [object HTMLParagraphElement], length: 2
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
length: 0
length: 0
@@ -39,8 +39,8 @@
[object HTMLDivElement], [object HTMLDivElement], length: 2
[object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 3
[object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 3
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
length: 0
length: 0
@@ -51,8 +51,8 @@
[object HTMLDivElement]
[object HTMLDivElement]
[object HTMLDivElement]
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
@@ -64,8 +64,8 @@
[object HTMLDivElement]
[object HTMLDivElement]
[object HTMLDivElement]
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
@@ -77,8 +77,8 @@
[object HTMLDivElement]
[object HTMLDivElement]
[object HTMLDivElement]
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
diff --git a/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-expected.txt b/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-expected.txt
index de3bc1e..522d62a 100644
--- a/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-expected.txt
+++ b/LayoutTests/fast/dom/SelectorAPI/dumpNodeList-expected.txt
@@ -12,8 +12,8 @@
[object HTMLDivElement], [object HTMLDivElement], length: 2
[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 4
[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 5
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
length: 0
length: 0
[object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], [object HTMLDivElement], length: 4
@@ -26,8 +26,8 @@
[object HTMLDivElement], [object HTMLDivElement], length: 2
[object HTMLDivElement], [object HTMLParagraphElement], length: 2
[object HTMLDivElement], [object HTMLParagraphElement], length: 2
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
length: 0
length: 0
@@ -39,8 +39,8 @@
[object HTMLDivElement], [object HTMLDivElement], length: 2
[object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 3
[object HTMLDivElement], [object HTMLDivElement], [object HTMLParagraphElement], length: 3
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
length: 0
length: 0
@@ -51,8 +51,8 @@
[object HTMLDivElement]
[object HTMLDivElement]
[object HTMLDivElement]
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
@@ -64,8 +64,8 @@
[object HTMLDivElement]
[object HTMLDivElement]
[object HTMLDivElement]
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
@@ -77,8 +77,8 @@
[object HTMLDivElement]
[object HTMLDivElement]
[object HTMLDivElement]
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
+SyntaxError: The string did not match the expected pattern.
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
TypeError: null is not an object (evaluating 'node.querySelector(selectorString).dump')
diff --git a/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt b/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt
index 65a07a0..49d8a34 100644
--- a/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt
+++ b/LayoutTests/fast/dom/SelectorAPI/not-supported-namespace-in-selector-expected.txt
@@ -1,9 +1,9 @@
This tests that we throw a NAMESPACE_ERR when parsing a selector string for querySelector and querySelectorAll that contains a namespace.
-PASS: document.querySelector('bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.querySelectorAll('bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.matches('bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.webkitMatchesSelector('bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+PASS: document.querySelector('bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.querySelectorAll('bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.matches('bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.webkitMatchesSelector('bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
PASS: document.querySelector('*|pre') did not throw
PASS: document.querySelectorAll('*|pre') did not throw
PASS: document.body.matches('*|pre') did not throw
@@ -12,10 +12,10 @@
PASS: document.querySelectorAll('|pre') did not throw
PASS: document.body.matches('|pre') did not throw
PASS: document.body.webkitMatchesSelector('|pre') did not throw
-PASS: document.querySelector('div bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.querySelectorAll('div bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.matches('div bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.webkitMatchesSelector('div bbb|pre') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+PASS: document.querySelector('div bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.querySelectorAll('div bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.matches('div bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.webkitMatchesSelector('div bbb|pre') throws: SyntaxError: The string did not match the expected pattern.
PASS: document.querySelector('div *|pre') did not throw
PASS: document.querySelectorAll('div *|pre') did not throw
PASS: document.body.matches('div *|pre') did not throw
@@ -24,10 +24,10 @@
PASS: document.querySelectorAll('div |pre') did not throw
PASS: document.body.matches('div |pre') did not throw
PASS: document.body.webkitMatchesSelector('div |pre') did not throw
-PASS: document.querySelector('[bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.querySelectorAll('[bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.matches('[bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.webkitMatchesSelector('[bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+PASS: document.querySelector('[bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.querySelectorAll('[bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.matches('[bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.webkitMatchesSelector('[bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
PASS: document.querySelector('[*|name=value]') did not throw
PASS: document.querySelectorAll('[*|name=value]') did not throw
PASS: document.body.matches('[*|name=value]') did not throw
@@ -36,11 +36,11 @@
PASS: document.querySelectorAll('[|name=value]') did not throw
PASS: document.body.matches('[|name=value]') did not throw
PASS: document.body.webkitMatchesSelector('[|name=value]') did not throw
-PASS: document.querySelector(':-webkit-any(bbb|pre)') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.querySelector('div [bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.querySelectorAll('div [bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.matches('div [bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: document.body.webkitMatchesSelector('div [bbb|name=value]') throws: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+PASS: document.querySelector(':-webkit-any(bbb|pre)') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.querySelector('div [bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.querySelectorAll('div [bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.matches('div [bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
+PASS: document.body.webkitMatchesSelector('div [bbb|name=value]') throws: SyntaxError: The string did not match the expected pattern.
PASS: document.querySelector('div [*|name=value]') did not throw
PASS: document.querySelectorAll('div [*|name=value]') did not throw
PASS: document.body.matches('div [*|name=value]') did not throw
diff --git a/LayoutTests/fast/dom/Text/splitText-expected.txt b/LayoutTests/fast/dom/Text/splitText-expected.txt
index b445202..6f30cba 100644
--- a/LayoutTests/fast/dom/Text/splitText-expected.txt
+++ b/LayoutTests/fast/dom/Text/splitText-expected.txt
@@ -7,8 +7,8 @@
PASS text.splitText(4).data is "efg"
PASS text.data is "abcd"
PASS text.splitText() threw exception TypeError: Not enough arguments.
-PASS text.splitText(999) threw exception IndexSizeError (DOM Exception 1): The index is not in the allowed range..
-PASS text.splitText(-1) threw exception IndexSizeError (DOM Exception 1): The index is not in the allowed range..
+PASS text.splitText(999) threw exception IndexSizeError: The index is not in the allowed range..
+PASS text.splitText(-1) threw exception IndexSizeError: The index is not in the allowed range..
PASS text.data is "abcd"
PASS text.splitText(-4294967294).data is "cd"
PASS text.data is "ab"
diff --git a/LayoutTests/fast/dom/Text/splitText.html b/LayoutTests/fast/dom/Text/splitText.html
index 3ac22f9..b6598dfb 100644
--- a/LayoutTests/fast/dom/Text/splitText.html
+++ b/LayoutTests/fast/dom/Text/splitText.html
@@ -11,8 +11,8 @@
shouldBeEqualToString("text.splitText(4).data", "efg");
shouldBeEqualToString("text.data", "abcd");
shouldThrow("text.splitText()", "'TypeError: Not enough arguments'");
-shouldThrow("text.splitText(999)", '"IndexSizeError (DOM Exception 1): The index is not in the allowed range."');
-shouldThrow("text.splitText(-1)", '"IndexSizeError (DOM Exception 1): The index is not in the allowed range."');
+shouldThrowErrorName("text.splitText(999)", 'IndexSizeError');
+shouldThrowErrorName("text.splitText(-1)", 'IndexSizeError');
shouldBeEqualToString("text.data", "abcd");
shouldBeEqualToString("text.splitText(-4294967294).data", "cd");
shouldBeEqualToString("text.data", "ab");
diff --git a/LayoutTests/fast/dom/Window/anonymous-slot-with-changes-expected.txt b/LayoutTests/fast/dom/Window/anonymous-slot-with-changes-expected.txt
index 1e4092d..3dc44ab 100644
--- a/LayoutTests/fast/dom/Window/anonymous-slot-with-changes-expected.txt
+++ b/LayoutTests/fast/dom/Window/anonymous-slot-with-changes-expected.txt
@@ -1,5 +1,5 @@
Tests that we clone object hierarchies
-PASS: 'postMessage((function(){}))' threw DataCloneError (DOM Exception 25): The object can not be cloned.
+PASS: 'postMessage((function(){}))' threw DataCloneError: The object can not be cloned.
PASS: eventData is null of type object
PASS: eventData is null of type object
PASS: eventData is null of type object
diff --git a/LayoutTests/fast/dom/Window/atob-btoa-expected.txt b/LayoutTests/fast/dom/Window/atob-btoa-expected.txt
index 868a5f0..323ffd9 100644
--- a/LayoutTests/fast/dom/Window/atob-btoa-expected.txt
+++ b/LayoutTests/fast/dom/Window/atob-btoa-expected.txt
@@ -18,14 +18,14 @@
PASS window.btoa(window) is "W29iamVjdCBXaW5kb3dd"
PASS window.btoa("éé") is "6ek="
PASS window.btoa("\u0080\u0081") is "gIE="
-PASS window.btoa("тест") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS window.btoa("тест") threw exception InvalidCharacterError: The string contains invalid characters..
PASS window.btoa is 0
PASS typeof window.btoa is "number"
PASS typeof window.atob is "function"
PASS window.atob() threw exception TypeError: Not enough arguments.
PASS window.atob("") is ""
PASS window.atob(null) is "ée"
-PASS window.atob(undefined) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS window.atob(undefined) threw exception InvalidCharacterError: The string contains invalid characters..
PASS window.atob(" YQ==") is "a"
PASS window.atob("YQ==\u000a") is "a"
PASS window.atob("ab\tcd") is "i·"
@@ -36,29 +36,29 @@
PASS window.atob(" \t\n\f\r ab\t\n\f\r cd\t\n\f\r ") is "i·"
PASS window.atob("ab\t\n\f\r =\t\n\f\r =\t\n\f\r ") is "i"
PASS window.atob(" ") is ""
-PASS window.atob(" abcd===") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("abcd=== ") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("abcd ===") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS window.atob(" abcd===") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("abcd=== ") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("abcd ===") threw exception InvalidCharacterError: The string contains invalid characters..
PASS window.atob("6ek=") is "éé"
PASS window.atob("6ek") is "éé"
PASS window.atob("gIE=") is ""
-PASS window.atob("тест") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("z") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS window.atob("тест") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("z") threw exception InvalidCharacterError: The string contains invalid characters..
PASS window.atob("zz") is "Ï"
PASS window.atob("zzz") is "Ï<"
PASS window.atob("zzz=") is "Ï<"
-PASS window.atob("zzz==") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("zzz===") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("zzz====") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("zzz=====") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS window.atob("zzz==") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("zzz===") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("zzz====") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("zzz=====") threw exception InvalidCharacterError: The string contains invalid characters..
PASS window.atob("zzzz") is "Ï<ó"
-PASS window.atob("zzzzz") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("z=zz") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("=") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("==") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("===") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("====") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS window.atob("=====") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS window.atob("zzzzz") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("z=zz") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("=") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("==") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("===") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("====") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS window.atob("=====") threw exception InvalidCharacterError: The string contains invalid characters..
PASS window.atob is 0
PASS typeof window.atob is "number"
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/dom/Window/custom-constructors-expected.txt b/LayoutTests/fast/dom/Window/custom-constructors-expected.txt
index 68175e0..fa977d1 100644
--- a/LayoutTests/fast/dom/Window/custom-constructors-expected.txt
+++ b/LayoutTests/fast/dom/Window/custom-constructors-expected.txt
@@ -9,7 +9,7 @@
PASS WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix) is 'matrix(1, 0, 0, 1, 0, 0)'
PASS WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix()) is 'matrix(1, 0, 0, 1, 0, 0)'
PASS WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix(undefined)) is 'matrix(1, 0, 0, 1, 0, 0)'
-PASS new WebKitCSSMatrix(null) threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS new WebKitCSSMatrix(null) threw exception SyntaxError: The string did not match the expected pattern..
PASS XMLHttpRequest.prototype.toString.call(new XMLHttpRequest) is '[object XMLHttpRequest]'
PASS XSLTProcessor.prototype.toString.call(new XSLTProcessor) is '[object XSLTProcessor]'
PASS successfullyParsed is true
diff --git a/LayoutTests/fast/dom/Window/dispatchEvent-expected.txt b/LayoutTests/fast/dom/Window/dispatchEvent-expected.txt
index cc9be46..238743e 100644
--- a/LayoutTests/fast/dom/Window/dispatchEvent-expected.txt
+++ b/LayoutTests/fast/dom/Window/dispatchEvent-expected.txt
@@ -4,7 +4,7 @@
PASS window.dispatchEvent(event) threw exception TypeError: Argument 1 ('event') to EventTarget.dispatchEvent must be an instance of Event.
-PASS window.dispatchEvent(event) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
+PASS window.dispatchEvent(event) threw exception InvalidStateError: The object is in an invalid state..
PASS myEventDispatched is true
PASS target is window
PASS currentTarget is window
diff --git a/LayoutTests/fast/dom/Window/invalid-protocol-expected.txt b/LayoutTests/fast/dom/Window/invalid-protocol-expected.txt
index 4bb90a5..342102a 100644
--- a/LayoutTests/fast/dom/Window/invalid-protocol-expected.txt
+++ b/LayoutTests/fast/dom/Window/invalid-protocol-expected.txt
@@ -3,11 +3,11 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS location.protocol = '' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS location.protocol = ':' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS location.protocol = 'é' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS location.protocol = '[' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS location.protocol = '0' threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS location.protocol = '' threw exception SyntaxError: The string did not match the expected pattern..
+PASS location.protocol = ':' threw exception SyntaxError: The string did not match the expected pattern..
+PASS location.protocol = 'é' threw exception SyntaxError: The string did not match the expected pattern..
+PASS location.protocol = '[' threw exception SyntaxError: The string did not match the expected pattern..
+PASS location.protocol = '0' threw exception SyntaxError: The string did not match the expected pattern..
PASS a.protocol is 'http:'
PASS a.href is 'https://www.apple.com/'
PASS a.href is 'http://www.apple.com/'
diff --git a/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt b/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
index 7cfdb50..3da2195 100644
--- a/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-postmessage-clone-expected.txt
@@ -1,8 +1,8 @@
Tests that we clone object hierarchies
-PASS: 'postMessage((function(){}))' threw DataCloneError (DOM Exception 25): The object can not be cloned.
-PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw DataCloneError (DOM Exception 25): The object can not be cloned.
-PASS: 'postMessage(window)' threw DataCloneError (DOM Exception 25): The object can not be cloned.
+PASS: 'postMessage((function(){}))' threw DataCloneError: The object can not be cloned.
+PASS: 'postMessage(var x = 0; try { eval("badref"); } catch(e) { x = e; } x)' threw DataCloneError: The object can not be cloned.
+PASS: 'postMessage(window)' threw DataCloneError: The object can not be cloned.
PASS: 'postMessage(({get a() { throw "x" }}))' threw x
PASS: 'postMessage((function() {return {get a() { throw "accessor-exn"; }};})())' threw accessor-exn
PASS: 'postMessage((function() {var obja = {get p() { throw "accessor-exn"; }}; return {get a() { return obja; }};})())' threw accessor-exn
diff --git a/LayoutTests/fast/dom/computed-style-set-property-expected.txt b/LayoutTests/fast/dom/computed-style-set-property-expected.txt
index bd16b64..0fc02bb 100644
--- a/LayoutTests/fast/dom/computed-style-set-property-expected.txt
+++ b/LayoutTests/fast/dom/computed-style-set-property-expected.txt
@@ -1,6 +1,6 @@
You should see two "PASS" messages below:
Computed style parent (should be null): null
-PASS: got an exception when trying to change a computed style declaration, NoModificationAllowedError (DOM Exception 7): The object can not be modified.
+PASS: got an exception when trying to change a computed style declaration, NoModificationAllowedError: The object can not be modified.
-PASS: got an exception when trying to change a computed style declaration via setProperty, NoModificationAllowedError (DOM Exception 7): The object can not be modified.
+PASS: got an exception when trying to change a computed style declaration via setProperty, NoModificationAllowedError: The object can not be modified.
diff --git a/LayoutTests/fast/dom/createElementNS-namespace-errors-expected.txt b/LayoutTests/fast/dom/createElementNS-namespace-errors-expected.txt
index 0aa03b8..0f8b7fd 100644
--- a/LayoutTests/fast/dom/createElementNS-namespace-errors-expected.txt
+++ b/LayoutTests/fast/dom/createElementNS-namespace-errors-expected.txt
@@ -3,27 +3,27 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS document.createElementNS(null, 'foo:bar') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+FAIL document.createElementNS(null, 'foo:bar') should throw NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML.. Threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc') did not throw exception.
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').namespaceURI is "http://www.w3.org/XML/1998/namespace"
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').nodeName is "xml:abc"
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').prefix is "xml"
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').localName is "abc"
-PASS document.createElementNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS document.createElementNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns') did not throw exception.
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').namespaceURI is "http://www.w3.org/2000/xmlns/"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').nodeName is "xmlns"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').prefix is null
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').localName is "xmlns"
-PASS document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc') did not throw exception.
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').namespaceURI is "http://www.w3.org/2000/xmlns/"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').nodeName is "xmlns:abc"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').prefix is "xmlns"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').localName is "abc"
-PASS document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
-PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
-PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'notxmlns') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
+PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
+PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'notxmlns') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/createElementNS-namespace-errors.html b/LayoutTests/fast/dom/createElementNS-namespace-errors.html
index 1575ad8..2c2e7ef 100644
--- a/LayoutTests/fast/dom/createElementNS-namespace-errors.html
+++ b/LayoutTests/fast/dom/createElementNS-namespace-errors.html
@@ -15,7 +15,7 @@
shouldBe("document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').nodeName", '"xml:abc"');
shouldBe("document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').prefix", '"xml"');
shouldBe("document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').localName", '"abc"');
-shouldThrow("document.createElementNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("document.createElementNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc')", 'NamespaceError');
// Step 7.
shouldNotThrow("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns')");
@@ -23,19 +23,19 @@
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').nodeName", '"xmlns"');
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').prefix", 'null');
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').localName", '"xmlns"');
-shouldThrow("document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns')", 'NamespaceError');
shouldNotThrow("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc')");
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').namespaceURI", '"http://www.w3.org/2000/xmlns/"');
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').nodeName", '"xmlns:abc"');
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').prefix", '"xmlns"');
shouldBe("document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').localName", '"abc"');
-shouldThrow("document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc')", 'NamespaceError');
// Step 8.
-shouldThrow("document.createElementNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("document.createElementNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns')", 'NamespaceError');
-shouldThrow("document.createElementNS('http://www.w3.org/2000/xmlns/', 'notxmlns')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("document.createElementNS('http://www.w3.org/2000/xmlns/', 'notxmlns')", 'NamespaceError');
</script>
<script src="../../resources/js-test-post.js"></script>
diff --git a/LayoutTests/fast/dom/css-mediarule-functions-expected.txt b/LayoutTests/fast/dom/css-mediarule-functions-expected.txt
index b49001a..2c0061d 100644
--- a/LayoutTests/fast/dom/css-mediarule-functions-expected.txt
+++ b/LayoutTests/fast/dom/css-mediarule-functions-expected.txt
@@ -1,12 +1,12 @@
This tests the insertRule(rule, index) and deleteRule(index) methods of the CSSMediaRule interface. It has passed if all of the output below begins with the text "PASS".
PASS: No exception raised! New rule inserted successfully.
-PASS: Exception raised successfully. Type: IndexSizeError (DOM Exception 1): The index is not in the allowed range.
-PASS: Exception raised successfully. Type: IndexSizeError (DOM Exception 1): The index is not in the allowed range.
-PASS: Exception raised successfully. Type: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: Exception raised successfully. Type: HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.
-PASS: Exception raised successfully. Type: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
-PASS: Exception raised successfully. Type: SyntaxError (DOM Exception 12): The string did not match the expected pattern.
+PASS: Exception raised successfully. Type: IndexSizeError: The index is not in the allowed range.
+PASS: Exception raised successfully. Type: IndexSizeError: The index is not in the allowed range.
+PASS: Exception raised successfully. Type: SyntaxError: The string did not match the expected pattern.
+PASS: Exception raised successfully. Type: HierarchyRequestError: The operation would yield an incorrect node tree.
+PASS: Exception raised successfully. Type: SyntaxError: The string did not match the expected pattern.
+PASS: Exception raised successfully. Type: SyntaxError: The string did not match the expected pattern.
PASS: No exception raised! Rule at position 'length - 1' deleted successfully.
-PASS: Exception raised successfully. Type: IndexSizeError (DOM Exception 1): The index is not in the allowed range.
-PASS: Exception raised successfully. Type: IndexSizeError (DOM Exception 1): The index is not in the allowed range.
+PASS: Exception raised successfully. Type: IndexSizeError: The index is not in the allowed range.
+PASS: Exception raised successfully. Type: IndexSizeError: The index is not in the allowed range.
diff --git a/LayoutTests/fast/dom/dataset-expected.txt b/LayoutTests/fast/dom/dataset-expected.txt
index b25e749..4d29dcc 100644
--- a/LayoutTests/fast/dom/dataset-expected.txt
+++ b/LayoutTests/fast/dom/dataset-expected.txt
@@ -27,9 +27,9 @@
PASS testSet('', 'data-') is true
PASS testSet('à', 'data-à') is true
-PASS testSet('-foo', 'dummy') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS testSet('-foo', 'dummy') threw exception SyntaxError: The string did not match the expected pattern..
+PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters..
PASS testDelete('data-foo', 'foo') is true
PASS testDelete('data-foo-bar', 'fooBar') is true
diff --git a/LayoutTests/fast/dom/dataset-xhtml-expected.txt b/LayoutTests/fast/dom/dataset-xhtml-expected.txt
index 1563af0..c921cfc 100644
--- a/LayoutTests/fast/dom/dataset-xhtml-expected.txt
+++ b/LayoutTests/fast/dom/dataset-xhtml-expected.txt
@@ -22,9 +22,9 @@
PASS testSet('', 'data-') is true
PASS testSet('à', 'data-à') is true
-PASS testSet('-foo', 'dummy') threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS testSet('-foo', 'dummy') threw exception SyntaxError: The string did not match the expected pattern..
+PASS testSet('foo ', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters..
+PASS testSet('foo豈', 'dummy') threw exception InvalidCharacterError: The string contains invalid characters..
PASS testDelete('data-foo', 'foo') is true
PASS testDelete('data-foo-bar', 'fooBar') is true
diff --git a/LayoutTests/fast/dom/dataset-xhtml.xhtml b/LayoutTests/fast/dom/dataset-xhtml.xhtml
index f8bb692..023016b 100644
--- a/LayoutTests/fast/dom/dataset-xhtml.xhtml
+++ b/LayoutTests/fast/dom/dataset-xhtml.xhtml
@@ -56,9 +56,9 @@
shouldBeTrue("testSet('\xE0', 'data-\xE0')");
debug("");
-shouldThrow("testSet('-foo', 'dummy')", "'SyntaxError (DOM Exception 12): The string did not match the expected pattern.'");
-shouldThrow("testSet('foo\x20', 'dummy')", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
-shouldThrow("testSet('foo\uF900', 'dummy')", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("testSet('-foo', 'dummy')", "SyntaxError");
+shouldThrowErrorName("testSet('foo\x20', 'dummy')", "InvalidCharacterError");
+shouldThrowErrorName("testSet('foo\uF900', 'dummy')", "InvalidCharacterError");
debug("");
function testDelete(attr, prop)
diff --git a/LayoutTests/fast/dom/dataset.html b/LayoutTests/fast/dom/dataset.html
index 9cab52c..8c1cfa6 100644
--- a/LayoutTests/fast/dom/dataset.html
+++ b/LayoutTests/fast/dom/dataset.html
@@ -59,9 +59,9 @@
shouldBeTrue("testSet('\xE0', 'data-\xE0')");
debug("");
-shouldThrow("testSet('-foo', 'dummy')", "'SyntaxError (DOM Exception 12): The string did not match the expected pattern.'");
-shouldThrow("testSet('foo\x20', 'dummy')", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
-shouldThrow("testSet('foo\uF900', 'dummy')", "'InvalidCharacterError (DOM Exception 5): The string contains invalid characters.'");
+shouldThrowErrorName("testSet('-foo', 'dummy')", "SyntaxError");
+shouldThrowErrorName("testSet('foo\x20', 'dummy')", "InvalidCharacterError");
+shouldThrowErrorName("testSet('foo\uF900', 'dummy')", "InvalidCharacterError");
debug("");
function testDelete(attr, prop)
diff --git a/LayoutTests/fast/dom/document-set-body-null-expected.txt b/LayoutTests/fast/dom/document-set-body-null-expected.txt
index e240730..8a741fd 100644
--- a/LayoutTests/fast/dom/document-set-body-null-expected.txt
+++ b/LayoutTests/fast/dom/document-set-body-null-expected.txt
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS testDocument.body = null threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS testDocument.body = null threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/document-set-body-null.html b/LayoutTests/fast/dom/document-set-body-null.html
index 3c74564..94ae191 100644
--- a/LayoutTests/fast/dom/document-set-body-null.html
+++ b/LayoutTests/fast/dom/document-set-body-null.html
@@ -9,7 +9,7 @@
description("Tests setting document.body to null");
var testDocument = document.getElementById("testFrame").contentDocument;
-shouldThrow("testDocument.body = null", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("testDocument.body = null", "HierarchyRequestError");
</script>
<script src="../../resources/js-test-post.js"></script>
diff --git a/LayoutTests/fast/dom/element-attribute-js-null-expected.txt b/LayoutTests/fast/dom/element-attribute-js-null-expected.txt
index 20b1ea0..db8a914 100644
--- a/LayoutTests/fast/dom/element-attribute-js-null-expected.txt
+++ b/LayoutTests/fast/dom/element-attribute-js-null-expected.txt
@@ -11,7 +11,7 @@
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLElement.className]
TEST SUCCEEDED: The value was the empty string. [tested HTMLElement.innerHTML]
TEST SUCCEEDED: The value was the empty string. [tested HTMLElement.innerText]
-TEST SUCCEEDED: Exception (SyntaxError (DOM Exception 12): The string did not match the expected pattern.) was thrown as expected. [tested HTMLElement.contentEditable]
+TEST SUCCEEDED: Exception (SyntaxError: The string did not match the expected pattern.) was thrown as expected. [tested HTMLElement.contentEditable]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLAnchorElement.accessKey]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLAnchorElement.charset]
diff --git a/LayoutTests/fast/dom/outerText-no-element-expected.txt b/LayoutTests/fast/dom/outerText-no-element-expected.txt
index 549bc5a..490f6eb 100644
--- a/LayoutTests/fast/dom/outerText-no-element-expected.txt
+++ b/LayoutTests/fast/dom/outerText-no-element-expected.txt
@@ -2,4 +2,4 @@
This page will try to set the outerText on an element that is no longer in the DOM tree. You should see a description of an expected error.
this is a big test or something
-Expected error - NoModificationAllowedError (DOM Exception 7): The object can not be modified.
+Expected error - NoModificationAllowedError: The object can not be modified.
diff --git a/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions-expected.txt b/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions-expected.txt
index fdda2ba..3b2b60a 100644
--- a/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions-expected.txt
+++ b/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions-expected.txt
@@ -4,8 +4,8 @@
PASS pi.appendChild(null) threw exception TypeError: Argument 1 ('node') to Node.appendChild must be an instance of Node.
-PASS pi.appendChild(div) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
-PASS pi.appendChild(textNode) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS pi.appendChild(div) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
+PASS pi.appendChild(textNode) threw exception HierarchyRequestError: The operation would yield an incorrect node tree..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions.xhtml b/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions.xhtml
index d3dee4f..30bd585 100644
--- a/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions.xhtml
+++ b/LayoutTests/fast/dom/processing-instruction-appendChild-exceptions.xhtml
@@ -7,9 +7,9 @@
var pi = document.createProcessingInstruction('target', 'data');
shouldThrow("pi.appendChild(null)");
var div = document.createElement('div');
-shouldThrow("pi.appendChild(div)", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("pi.appendChild(div)", "HierarchyRequestError");
var textNode = document.createTextNode('sometext');
-shouldThrow("pi.appendChild(textNode)", "'HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.'");
+shouldThrowErrorName("pi.appendChild(textNode)", "HierarchyRequestError");
]]>
</script>
<script src="../../resources/js-test-post.js"></script>
diff --git a/LayoutTests/fast/dom/rel-list-expected.txt b/LayoutTests/fast/dom/rel-list-expected.txt
index d210024..e50264b 100644
--- a/LayoutTests/fast/dom/rel-list-expected.txt
+++ b/LayoutTests/fast/dom/rel-list-expected.txt
@@ -54,8 +54,8 @@
PASS element.rel is ""
PASS element.relList.toggle('x', false) is false
PASS element.rel is ""
-PASS element.relList.toggle("", true) threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.toggle("x y", false) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.toggle("", true) threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.toggle("x y", false) threw exception InvalidCharacterError: The string contains invalid characters..
Testing add in presence of trailing white spaces.
PASS element.rel is "x y"
PASS element.rel is "x y"
@@ -63,11 +63,11 @@
Test invalid tokens
PASS element.relList.contains("") is false
PASS element.relList.contains("x y") is false
-PASS element.relList.add("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.add("x y") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS element.relList.remove("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.remove("x y") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS element.relList.toggle("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.add("") threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.add("x y") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS element.relList.remove("") threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.remove("x y") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS element.relList.toggle("") threw exception SyntaxError: The string did not match the expected pattern..
Indexing
PASS element.relList[0] is "x"
PASS element.relList.item(0) is "x"
@@ -107,9 +107,9 @@
PASS element.rel is "a b c"
PASS element.rel is "a b c null d undefined 0 false"
PASS element.rel is "a b"
-PASS element.relList.add("a", "b", "") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.add("a", "b", "") threw exception SyntaxError: The string did not match the expected pattern..
PASS element.rel is ""
-PASS element.relList.add("a", "b", "c d") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.add("a", "b", "c d") threw exception InvalidCharacterError: The string contains invalid characters..
PASS element.rel is ""
PASS element.relList.add("a", {toString: function() { throw new Error("user error"); }}, "b") threw exception Error: user error.
PASS element.rel is ""
@@ -118,11 +118,11 @@
PASS element.rel is "b d"
PASS element.rel is "d"
PASS element.rel is "a b c"
-PASS element.relList.remove("a", "b", "") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.remove("a", "b", "") threw exception SyntaxError: The string did not match the expected pattern..
PASS element.rel is "a b"
PASS element.relList.remove("a", {toString: function() { throw new Error("user error"); }}, "b") threw exception Error: user error.
PASS element.rel is "a b"
-PASS element.relList.remove("a", "b", "c d") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.remove("a", "b", "c d") threw exception InvalidCharacterError: The string contains invalid characters..
PASS element.rel is "a b"
PASS element.relList.remove() did not throw exception.
PASS observer.takeRecords().length is 1
@@ -177,8 +177,8 @@
PASS element.rel is ""
PASS element.relList.toggle('x', false) is false
PASS element.rel is ""
-PASS element.relList.toggle("", true) threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.toggle("x y", false) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.toggle("", true) threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.toggle("x y", false) threw exception InvalidCharacterError: The string contains invalid characters..
Testing add in presence of trailing white spaces.
PASS element.rel is "x y"
PASS element.rel is "x y"
@@ -186,11 +186,11 @@
Test invalid tokens
PASS element.relList.contains("") is false
PASS element.relList.contains("x y") is false
-PASS element.relList.add("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.add("x y") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS element.relList.remove("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.remove("x y") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS element.relList.toggle("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.add("") threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.add("x y") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS element.relList.remove("") threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.remove("x y") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS element.relList.toggle("") threw exception SyntaxError: The string did not match the expected pattern..
Indexing
PASS element.relList[0] is "x"
PASS element.relList.item(0) is "x"
@@ -230,9 +230,9 @@
PASS element.rel is "a b c"
PASS element.rel is "a b c null d undefined 0 false"
PASS element.rel is "a b"
-PASS element.relList.add("a", "b", "") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.add("a", "b", "") threw exception SyntaxError: The string did not match the expected pattern..
PASS element.rel is ""
-PASS element.relList.add("a", "b", "c d") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.add("a", "b", "c d") threw exception InvalidCharacterError: The string contains invalid characters..
PASS element.rel is ""
PASS element.relList.add("a", {toString: function() { throw new Error("user error"); }}, "b") threw exception Error: user error.
PASS element.rel is ""
@@ -241,11 +241,11 @@
PASS element.rel is "b d"
PASS element.rel is "d"
PASS element.rel is "a b c"
-PASS element.relList.remove("a", "b", "") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.remove("a", "b", "") threw exception SyntaxError: The string did not match the expected pattern..
PASS element.rel is "a b"
PASS element.relList.remove("a", {toString: function() { throw new Error("user error"); }}, "b") threw exception Error: user error.
PASS element.rel is "a b"
-PASS element.relList.remove("a", "b", "c d") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.remove("a", "b", "c d") threw exception InvalidCharacterError: The string contains invalid characters..
PASS element.rel is "a b"
PASS element.relList.remove() did not throw exception.
PASS observer.takeRecords().length is 1
@@ -300,8 +300,8 @@
PASS element.rel is ""
PASS element.relList.toggle('x', false) is false
PASS element.rel is ""
-PASS element.relList.toggle("", true) threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.toggle("x y", false) threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.toggle("", true) threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.toggle("x y", false) threw exception InvalidCharacterError: The string contains invalid characters..
Testing add in presence of trailing white spaces.
PASS element.rel is "x y"
PASS element.rel is "x y"
@@ -309,11 +309,11 @@
Test invalid tokens
PASS element.relList.contains("") is false
PASS element.relList.contains("x y") is false
-PASS element.relList.add("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.add("x y") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS element.relList.remove("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
-PASS element.relList.remove("x y") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
-PASS element.relList.toggle("") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.add("") threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.add("x y") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS element.relList.remove("") threw exception SyntaxError: The string did not match the expected pattern..
+PASS element.relList.remove("x y") threw exception InvalidCharacterError: The string contains invalid characters..
+PASS element.relList.toggle("") threw exception SyntaxError: The string did not match the expected pattern..
Indexing
PASS element.relList[0] is "x"
PASS element.relList.item(0) is "x"
@@ -353,9 +353,9 @@
PASS element.rel is "a b c"
PASS element.rel is "a b c null d undefined 0 false"
PASS element.rel is "a b"
-PASS element.relList.add("a", "b", "") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.add("a", "b", "") threw exception SyntaxError: The string did not match the expected pattern..
PASS element.rel is ""
-PASS element.relList.add("a", "b", "c d") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.add("a", "b", "c d") threw exception InvalidCharacterError: The string contains invalid characters..
PASS element.rel is ""
PASS element.relList.add("a", {toString: function() { throw new Error("user error"); }}, "b") threw exception Error: user error.
PASS element.rel is ""
@@ -364,11 +364,11 @@
PASS element.rel is "b d"
PASS element.rel is "d"
PASS element.rel is "a b c"
-PASS element.relList.remove("a", "b", "") threw exception SyntaxError (DOM Exception 12): The string did not match the expected pattern..
+PASS element.relList.remove("a", "b", "") threw exception SyntaxError: The string did not match the expected pattern..
PASS element.rel is "a b"
PASS element.relList.remove("a", {toString: function() { throw new Error("user error"); }}, "b") threw exception Error: user error.
PASS element.rel is "a b"
-PASS element.relList.remove("a", "b", "c d") threw exception InvalidCharacterError (DOM Exception 5): The string contains invalid characters..
+PASS element.relList.remove("a", "b", "c d") threw exception InvalidCharacterError: The string contains invalid characters..
PASS element.rel is "a b"
PASS element.relList.remove() did not throw exception.
PASS observer.takeRecords().length is 1
diff --git a/LayoutTests/fast/dom/setAttributeNS-namespace-errors-expected.txt b/LayoutTests/fast/dom/setAttributeNS-namespace-errors-expected.txt
index a853d06..4fecc45 100644
--- a/LayoutTests/fast/dom/setAttributeNS-namespace-errors-expected.txt
+++ b/LayoutTests/fast/dom/setAttributeNS-namespace-errors-expected.txt
@@ -3,15 +3,15 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS elem.setAttributeNS(null, 'foo:bar', 'baz') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS elem.setAttributeNS(null, 'foo:bar', 'baz') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS elem.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:abc', 'foo') did not throw exception.
-PASS elem.setAttributeNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc', 'foo') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS elem.setAttributeNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc', 'foo') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'http://wwww.example.org') did not throw exception.
-PASS elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns', 'http://wwww.example.org') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns', 'http://wwww.example.org') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc', 'http://wwww.example.org') did not throw exception.
-PASS elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc', 'http://wwww.example.org') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
-PASS elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns', 'http://wwww.example.org') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
-PASS elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'notxmlns', 'http://wwww.example.org') threw exception NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML..
+PASS elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc', 'http://wwww.example.org') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
+PASS elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns', 'http://wwww.example.org') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
+PASS elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'notxmlns', 'http://wwww.example.org') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/setAttributeNS-namespace-errors.html b/LayoutTests/fast/dom/setAttributeNS-namespace-errors.html
index ca6e7e1..9208119 100644
--- a/LayoutTests/fast/dom/setAttributeNS-namespace-errors.html
+++ b/LayoutTests/fast/dom/setAttributeNS-namespace-errors.html
@@ -9,21 +9,21 @@
// Spec: http://www.w3.org/TR/dom/#dom-element-setattributens
// Step 5.
-shouldThrow("elem.setAttributeNS(null, 'foo:bar', 'baz')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("elem.setAttributeNS(null, 'foo:bar', 'baz')", 'NamespaceError');
// Step 6.
shouldNotThrow("elem.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:abc', 'foo')");
-shouldThrow("elem.setAttributeNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc', 'foo')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("elem.setAttributeNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc', 'foo')", 'NamespaceError');
// Step 7.
shouldNotThrow("elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns', 'http://wwww.example.org')");
-shouldThrow("elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns', 'http://wwww.example.org')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns', 'http://wwww.example.org')", 'NamespaceError');
shouldNotThrow("elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc', 'http://wwww.example.org')");
-shouldThrow("elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc', 'http://wwww.example.org')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("elem.setAttributeNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc', 'http://wwww.example.org')", 'NamespaceError');
// Step 8.
-shouldThrow("elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns', 'http://wwww.example.org')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
-shouldThrow("elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'notxmlns', 'http://wwww.example.org')", '"NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML."');
+shouldThrowErrorName("elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns', 'http://wwww.example.org')", 'NamespaceError');
+shouldThrowErrorName("elem.setAttributeNS('http://www.w3.org/2000/xmlns/', 'notxmlns', 'http://wwww.example.org')", 'NamespaceError');
</script>
<script src="../../resources/js-test-post.js"></script>
diff --git a/LayoutTests/fast/dom/setPrimitiveValue-exceptions-expected.txt b/LayoutTests/fast/dom/setPrimitiveValue-exceptions-expected.txt
index 713b222..530d986 100644
--- a/LayoutTests/fast/dom/setPrimitiveValue-exceptions-expected.txt
+++ b/LayoutTests/fast/dom/setPrimitiveValue-exceptions-expected.txt
@@ -6,45 +6,45 @@
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getStringValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getCounterValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getRectValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getRGBColorValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getStringValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
PASS fontFamily.getStringValue() is "Times"
-PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_STRING, 'Hi there!') threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_ATTR, "G'day!") threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_UNKNOWN, 'Hi there!') threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_DIMENSION, "G'day!") threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_COUNTER, 'Hello, world!') threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS fontFamily.getFloatValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS fontFamily.getCounterValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS fontFamily.getRectValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS fontFamily.getRGBColorValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
+PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_STRING, 'Hi there!') threw exception NoModificationAllowedError: The object can not be modified..
+PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_ATTR, "G'day!") threw exception NoModificationAllowedError: The object can not be modified..
+PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_UNKNOWN, 'Hi there!') threw exception NoModificationAllowedError: The object can not be modified..
+PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_DIMENSION, "G'day!") threw exception NoModificationAllowedError: The object can not be modified..
+PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_COUNTER, 'Hello, world!') threw exception NoModificationAllowedError: The object can not be modified..
+PASS fontFamily.getFloatValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS fontFamily.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS fontFamily.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS fontFamily.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS fontFamily.getStringValue() is "Times"
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception NoModificationAllowedError (DOM Exception 7): The object can not be modified..
-PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getStringValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getCounterValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getRectValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS left.getRGBColorValue() threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception NoModificationAllowedError: The object can not be modified..
+PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getStringValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
+PASS left.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10