Commit 6fcb819d authored by arv@chromium.org's avatar arv@chromium.org

Update DOMException name: TypeMismatchError

https://bugs.webkit.org/show_bug.cgi?id=102418

Reviewed by Kentaro Hara.

Source/WebCore:

Patch 17 of 25 to update DOMException name to match the spec and Firefox.

Updated existing tests.

* dom/DOMCoreException.cpp:
(WebCore):
* dom/ExceptionCode.h:

LayoutTests:

Updated tests and expectations.

* editing/selection/extend-expected.txt:
* fast/dom/Element/attr-param-typechecking-expected.txt:
* fast/dom/Geolocation/argument-types-expected.txt:
* fast/dom/Geolocation/not-enough-arguments-expected.txt:
* fast/dom/Geolocation/script-tests/argument-types.js:
(test):
* fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
* fast/js/select-options-add-expected.txt:
* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCSessionDescription-expected.txt:
* platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/efl/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/gtk/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/mac/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/qt/fast/dynamic/insertAdjacentElement-expected.txt:
* security/crypto-random-values-types-expected.txt:
* svg/dom/SVGTransformList-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@134954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f9aa87b1
2012-11-16 Erik Arvidsson <arv@chromium.org>
Update DOMException name: TypeMismatchError
https://bugs.webkit.org/show_bug.cgi?id=102418
Reviewed by Kentaro Hara.
Updated tests and expectations.
* editing/selection/extend-expected.txt:
* fast/dom/Element/attr-param-typechecking-expected.txt:
* fast/dom/Geolocation/argument-types-expected.txt:
* fast/dom/Geolocation/not-enough-arguments-expected.txt:
* fast/dom/Geolocation/script-tests/argument-types.js:
(test):
* fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
* fast/js/select-options-add-expected.txt:
* fast/mediastream/RTCIceCandidate-expected.txt:
* fast/mediastream/RTCPeerConnection-expected.txt:
* fast/mediastream/RTCSessionDescription-expected.txt:
* platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/efl/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/gtk/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/mac/fast/dynamic/insertAdjacentElement-expected.txt:
* platform/qt/fast/dynamic/insertAdjacentElement-expected.txt:
* security/crypto-random-values-types-expected.txt:
* svg/dom/SVGTransformList-expected.txt:
2012-11-16 Erik Arvidsson <arv@chromium.org>
Update DOMException name: InvalidAccessError
......@@ -4,5 +4,5 @@ Success: s.extend(span2.firstChild, 4) raised Error: IndexSizeError: DOM Excepti
Success: s.extend(span2.firstChild, -1) raised Error: IndexSizeError: DOM Exception 1.
Success: window.getSelection() is b.
Success: window.getSelection() is arbaz.
Success: s.extend() raised Error: TYPE_MISMATCH_ERR: DOM Exception 17.
Success: s.extend(null, 0) raised Error: TYPE_MISMATCH_ERR: DOM Exception 17.
Success: s.extend() raised Error: TypeMismatchError: DOM Exception 17.
Success: s.extend(null, 0) raised Error: TypeMismatchError: DOM Exception 17.
......@@ -3,18 +3,18 @@ This test checks whether passing wrong types to setAttributeNode causes a crash.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS element.setAttributeNode("style"); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNode(null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNode(undefined); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNode(new Object); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.removeAttributeNode("style"); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.removeAttributeNode(null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.removeAttributeNode(undefined); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.removeAttributeNode(new Object); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNodeNS("style"); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNodeNS(null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNodeNS(undefined); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNodeNS(new Object); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS element.setAttributeNode("style"); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode(null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode(undefined); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNode(new Object); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode("style"); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode(null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode(undefined); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.removeAttributeNode(new Object); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS("style"); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS(null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS(undefined); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS element.setAttributeNodeNS(new Object); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -3,31 +3,31 @@ Tests the acceptable types for arguments to Geolocation methods.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS navigator.geolocation.getCurrentPosition() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition({}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition() threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(undefined) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(null) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition({}) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(Math.abs) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(testRunner.setGeolocationPermission) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition("string") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(true) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(42) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(Infinity) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition("string") threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, testRunner.setGeolocationPermission) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, "string") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, Infinity) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, -Infinity) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, "string") threw exception Error: TypeMismatchError: DOM Exception 17.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, undefined) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, null) did not throw exception.
PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined, {}) did not throw exception.
......
......@@ -3,8 +3,8 @@ Tests how Geolocation handles receiving too few arguments.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS window.navigator.geolocation.getCurrentPosition() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS window.navigator.geolocation.watchPosition() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS window.navigator.geolocation.getCurrentPosition() threw exception Error: TypeMismatchError: DOM Exception 17.
PASS window.navigator.geolocation.watchPosition() threw exception Error: TypeMismatchError: DOM Exception 17.
PASS window.navigator.geolocation.clearWatch() threw exception TypeError: Not enough arguments.
PASS successfullyParsed is true
......
......@@ -15,7 +15,7 @@ function test(expression, expressionShouldThrow, expectedException) {
if (expectedException)
shouldThrow(expression, '(function() { return "' + expectedException + '"; })();');
else
shouldThrow(expression, '(function() { return "Error: TYPE_MISMATCH_ERR: DOM Exception 17"; })();');
shouldThrow(expression, '(function() { return "Error: TypeMismatchError: DOM Exception 17"; })();');
} else {
shouldNotThrow(expression);
}
......
......@@ -57,7 +57,7 @@ PASS mySelect.selectedIndex is -1
PASS mySelect.options.length is 10
PASS mySelect.selectedIndex is -1
19) trying to set an element that's not an option: select element
PASS mySelect.options[10] = mySelect; threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS mySelect.options[10] = mySelect; threw exception Error: TypeMismatchError: DOM Exception 17.
PASS mySelect.options.length is 10
PASS mySelect.selectedIndex is -1
20) trying to set a option element using an invalid index: negative infinity
......
......@@ -57,7 +57,7 @@ PASS mySelect.selectedIndex is 0
PASS mySelect.options.length is 10
PASS mySelect.selectedIndex is 0
19) trying to set an element that's not an option: select element
PASS mySelect.options[10] = mySelect; threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS mySelect.options[10] = mySelect; threw exception Error: TypeMismatchError: DOM Exception 17.
PASS mySelect.options.length is 10
PASS mySelect.selectedIndex is 0
20) trying to set a option element using an invalid index: negative infinity
......
......@@ -29,47 +29,47 @@ PASS select1.options[2].value is '3'
PASS select1.options[2].textContent is 'C'
1.4 Add a non-Option element
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.5 Add a non-element (string)
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.6 Add a non-element (number)
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.7 Add a non-element (boolean)
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.8 Add undefined
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.9 Add null
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.10 Add negative infinity
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.11 Add NaN
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
1.12 Add positive infinity
PASS select1.options.add(option1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select1.options.add(option1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select1.options.length is 3
PASS select1.selectedIndex is 0
......@@ -163,62 +163,62 @@ PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.9 Add an Option at index -Infinity
PASS select2.options.add(option2, -1/0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, -1/0) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.10 Add an Option at index NaN
PASS select2.options.add(option2, 0/0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 0/0) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.11 Add an Option at index Infinity
PASS select2.options.add(option2, 1/0) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1/0) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.12 Add a non-Option element
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.13 Add a non-element (string)
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.14 Add a non-element (number)
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.15 Add a non-element (boolean)
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.16 Add undefined
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.17 Add null
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.18 Add negative infinity
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.19 Add NaN
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
2.20 Add positive infinity
PASS select2.options.add(option2, 1) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS select2.options.add(option2, 1) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS select2.options.length is 7
PASS select2.selectedIndex is 1
......
......@@ -12,7 +12,7 @@ PASS candidate = new RTCIceCandidate(initializer); did not throw exception.
PASS candidate.candidate is "foo"
PASS candidate.sdpMid is "bar"
PASS candidate.sdpMLineIndex is 6
PASS new RTCIceCandidate({}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new RTCIceCandidate({}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new RTCIceCandidate(5); threw exception TypeError: Not an object..
PASS new RTCIceCandidate("foobar"); threw exception TypeError: Not an object..
PASS new RTCIceCandidate(candidate:""); threw exception SyntaxError: Unexpected token :.
......
......@@ -14,11 +14,11 @@ PASS new webkitRTCPeerConnection({iceServers:[]}, null); did not throw exception
PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0}]}); did not throw exception.
......@@ -28,12 +28,12 @@ PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:66}});
PASS new webkitRTCPeerConnection(null, {mandatory:{invalid:1}}); threw exception Error: NotSupportedError: DOM Exception 9.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported_1:1}}); threw exception Error: NotSupportedError: DOM Exception 9.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_but_unsupported_1:1, valid_and_supported_1:1}}); threw exception Error: NotSupportedError: DOM Exception 9.
PASS new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:0}}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {optional:{valid_and_supported_1:0}}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0,valid_and_supported_2:0}]}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {optional:[{invalid:0}]}); threw exception Error: NotSupportedError: DOM Exception 9.
PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -10,11 +10,11 @@ PASS initializer = JSON.parse(JSON.stringify(sessionDescription)); did not throw
PASS sessionDescription = new RTCSessionDescription(initializer); did not throw exception.
PASS sessionDescription.type is "offer"
PASS sessionDescription.sdp is "foobar"
PASS new RTCSessionDescription({}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new RTCSessionDescription({}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new RTCSessionDescription(5); threw exception TypeError: Not an object..
PASS new RTCSessionDescription('foobar'); threw exception TypeError: Not an object..
PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new RTCSessionDescription({type:'offer', sdp:''}); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS new RTCSessionDescription({type:'foobar', sdp:'x'}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new RTCSessionDescription({type:'offer', sdp:''}); threw exception Error: TypeMismatchError: DOM Exception 17.
PASS new RTCSessionDescription({type:'offer', sdp:'x'}); did not throw exception.
PASS new RTCSessionDescription({type:'answer', sdp:'x'}); did not throw exception.
PASS new RTCSessionDescription({type:'pranswer', sdp:'x'}); did not throw exception.
......
Caught expected exception: Error: NotSupportedError: DOM Exception 9
Caught expected exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
Caught expected exception: Error: TypeMismatchError: DOM Exception 17
1 (black) 2 (green) 3 (green) 4 (black)
PASS
Caught expected exception: Error: NotSupportedError: DOM Exception 9
Caught expected exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
Caught expected exception: Error: TypeMismatchError: DOM Exception 17
1 (black) 2 (green) 3 (green) 4 (black)
PASS
Caught expected exception: Error: NotSupportedError: DOM Exception 9
Caught expected exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
Caught expected exception: Error: TypeMismatchError: DOM Exception 17
1 (black) 2 (green) 3 (green) 4 (black)
PASS
Caught expected exception: Error: NotSupportedError: DOM Exception 9
Caught expected exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
Caught expected exception: Error: TypeMismatchError: DOM Exception 17
1 (black) 2 (green) 3 (green) 4 (black)
PASS
Caught expected exception: Error: NotSupportedError: DOM Exception 9
Caught expected exception: Error: TYPE_MISMATCH_ERR: DOM Exception 17
Caught expected exception: Error: TypeMismatchError: DOM Exception 17
1 (black) 2 (green) 3 (green) 4 (black)
PASS
......@@ -11,7 +11,7 @@ PASS crypto.getRandomValues(new Uint16Array(3)) is undefined.
PASS crypto.getRandomValues(new Int16Array(3)) is undefined.
PASS crypto.getRandomValues(new Uint32Array(3)) is undefined.
PASS crypto.getRandomValues(new Int32Array(3)) is undefined.
PASS crypto.getRandomValues(new Float32Array(3)) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS crypto.getRandomValues(new Float32Array(3)) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -11,8 +11,8 @@ PASS transform.createSVGTransformFromMatrix(svgElement) threw exception TypeErro
PASS transform.createSVGTransformFromMatrix('aString') threw exception TypeError: Type error.
PASS transform.createSVGTransformFromMatrix(1) threw exception TypeError: Type error.
PASS transform.createSVGTransformFromMatrix(true) threw exception TypeError: Type error.
PASS transform.createSVGTransformFromMatrix(undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS transform.createSVGTransformFromMatrix(null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS transform.createSVGTransformFromMatrix(undefined) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS transform.createSVGTransformFromMatrix(null) threw exception Error: TypeMismatchError: DOM Exception 17.
PASS successfullyParsed is true
TEST COMPLETE
......
2012-11-16 Erik Arvidsson <arv@chromium.org>
Update DOMException name: TypeMismatchError
https://bugs.webkit.org/show_bug.cgi?id=102418
Reviewed by Kentaro Hara.
Patch 17 of 25 to update DOMException name to match the spec and Firefox.
Updated existing tests.
* dom/DOMCoreException.cpp:
(WebCore):
* dom/ExceptionCode.h:
2012-11-16 Balazs Kelemen <kbalazs@webkit.org>
Coordinated Graphics: support the "freeze animations" API
......@@ -51,7 +51,7 @@ static struct CoreException {
{ "NamespaceError", "An attempt was made to create or change an object in a way which is incorrect with regard to namespaces." },
{ "InvalidAccessError", "A parameter or an operation was not supported by the underlying object." },
{ "ValidationError", "A call to a method such as insertBefore or removeChild would make the Node invalid with respect to \"partial validity\", this exception would be raised and the operation would not be done." },
{ "TYPE_MISMATCH_ERR", "The type of an object was incompatible with the expected type of the parameter associated to the object." },
{ "TypeMismatchError", "The type of an object was incompatible with the expected type of the parameter associated to the object." },
{ "SECURITY_ERR", "An attempt was made to break through the security policy of the user agent." },
// FIXME: Couldn't find a description in the HTML/DOM specifications for NETWORK_ERR, ABORT_ERR, URL_MISMATCH_ERR, and QUOTA_EXCEEDED_ERR
{ "NETWORK_ERR", "A network error occurred." },
......
......@@ -54,7 +54,7 @@ namespace WebCore {
// Introduced in DOM Level 3:
VALIDATION_ERR = 16, // Historical
TYPE_MISMATCH_ERR = 17,
TYPE_MISMATCH_ERR = 17, // Historical; use TypeError instead
// XMLHttpRequest extension:
SECURITY_ERR = 18,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment