Title: [134954] trunk
Revision
134954
Author
a...@chromium.org
Date
2012-11-16 08:22:08 -0800 (Fri, 16 Nov 2012)

Log Message

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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (134953 => 134954)


--- trunk/LayoutTests/ChangeLog	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/ChangeLog	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,5 +1,34 @@
 2012-11-16  Erik Arvidsson  <a...@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  <a...@chromium.org>
+
         Update DOMException name: InvalidAccessError
         https://bugs.webkit.org/show_bug.cgi?id=102400
 

Modified: trunk/LayoutTests/editing/selection/extend-expected.txt (134953 => 134954)


--- trunk/LayoutTests/editing/selection/extend-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/editing/selection/extend-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -4,5 +4,5 @@
 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.

Modified: trunk/LayoutTests/fast/dom/Element/attr-param-typechecking-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/dom/Element/attr-param-typechecking-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/dom/Element/attr-param-typechecking-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -3,18 +3,18 @@
 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

Modified: trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -3,31 +3,31 @@
 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.

Modified: trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/dom/Geolocation/not-enough-arguments-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -3,8 +3,8 @@
 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
 

Modified: trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js (134953 => 134954)


--- trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js	2012-11-16 16:22:08 UTC (rev 134954)
@@ -15,7 +15,7 @@
         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_);
     }

Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -57,7 +57,7 @@
 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

Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -57,7 +57,7 @@
 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

Modified: trunk/LayoutTests/fast/js/select-options-add-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/js/select-options-add-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/js/select-options-add-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -29,47 +29,47 @@
 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.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
 

Modified: trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -12,7 +12,7 @@
 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 :.

Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -14,11 +14,11 @@
 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:{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

Modified: trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt (134953 => 134954)


--- trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/fast/mediastream/RTCSessionDescription-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -10,11 +10,11 @@
 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.

Modified: trunk/LayoutTests/platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt (134953 => 134954)


--- trunk/LayoutTests/platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/platform/chromium/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,5 +1,5 @@
 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

Modified: trunk/LayoutTests/platform/efl/fast/dynamic/insertAdjacentElement-expected.txt (134953 => 134954)


--- trunk/LayoutTests/platform/efl/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/platform/efl/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,5 +1,5 @@
 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

Modified: trunk/LayoutTests/platform/gtk/fast/dynamic/insertAdjacentElement-expected.txt (134953 => 134954)


--- trunk/LayoutTests/platform/gtk/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/platform/gtk/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,5 +1,5 @@
 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

Modified: trunk/LayoutTests/platform/mac/fast/dynamic/insertAdjacentElement-expected.txt (134953 => 134954)


--- trunk/LayoutTests/platform/mac/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/platform/mac/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,5 +1,5 @@
 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

Modified: trunk/LayoutTests/platform/qt/fast/dynamic/insertAdjacentElement-expected.txt (134953 => 134954)


--- trunk/LayoutTests/platform/qt/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/platform/qt/fast/dynamic/insertAdjacentElement-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,5 +1,5 @@
 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

Modified: trunk/LayoutTests/security/crypto-random-values-types-expected.txt (134953 => 134954)


--- trunk/LayoutTests/security/crypto-random-values-types-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/security/crypto-random-values-types-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -11,7 +11,7 @@
 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

Modified: trunk/LayoutTests/svg/dom/SVGTransformList-expected.txt (134953 => 134954)


--- trunk/LayoutTests/svg/dom/SVGTransformList-expected.txt	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/LayoutTests/svg/dom/SVGTransformList-expected.txt	2012-11-16 16:22:08 UTC (rev 134954)
@@ -11,8 +11,8 @@
 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

Modified: trunk/Source/WebCore/ChangeLog (134953 => 134954)


--- trunk/Source/WebCore/ChangeLog	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/Source/WebCore/ChangeLog	2012-11-16 16:22:08 UTC (rev 134954)
@@ -1,3 +1,18 @@
+2012-11-16  Erik Arvidsson  <a...@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  <kbal...@webkit.org>
 
         Coordinated Graphics: support the "freeze animations" API

Modified: trunk/Source/WebCore/dom/DOMCoreException.cpp (134953 => 134954)


--- trunk/Source/WebCore/dom/DOMCoreException.cpp	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/Source/WebCore/dom/DOMCoreException.cpp	2012-11-16 16:22:08 UTC (rev 134954)
@@ -51,7 +51,7 @@
     { "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." },

Modified: trunk/Source/WebCore/dom/ExceptionCode.h (134953 => 134954)


--- trunk/Source/WebCore/dom/ExceptionCode.h	2012-11-16 16:19:54 UTC (rev 134953)
+++ trunk/Source/WebCore/dom/ExceptionCode.h	2012-11-16 16:22:08 UTC (rev 134954)
@@ -54,7 +54,7 @@
 
         // 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,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to