Modified: trunk/LayoutTests/fast/dom/MediaStream/argument-types-expected.txt (107539 => 107540)
--- trunk/LayoutTests/fast/dom/MediaStream/argument-types-expected.txt 2012-02-13 08:10:08 UTC (rev 107539)
+++ trunk/LayoutTests/fast/dom/MediaStream/argument-types-expected.txt 2012-02-13 08:17:59 UTC (rev 107540)
@@ -3,17 +3,17 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS navigator.webkitGetUserMedia() threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia({}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(objectThrowingException) threw exception Error: toString threw exception.
-PASS navigator.webkitGetUserMedia("video") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(-Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia(emptyFunction) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
+PASS navigator.webkitGetUserMedia() threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(undefined) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(null) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia({}) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(objectThrowingException) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia("video") threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(true) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(42) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(Infinity) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(-Infinity) threw exception TypeError: Not enough arguments.
+PASS navigator.webkitGetUserMedia(emptyFunction) threw exception TypeError: Not enough arguments.
PASS navigator.webkitGetUserMedia("video", emptyFunction) did not throw exception.
PASS navigator.webkitGetUserMedia(undefined, emptyFunction) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
PASS navigator.webkitGetUserMedia(null, emptyFunction) threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
@@ -27,8 +27,8 @@
PASS navigator.webkitGetUserMedia("video", "video") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.webkitGetUserMedia("video", undefined) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.webkitGetUserMedia("video", null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia("video", {}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia("video", objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
+PASS navigator.webkitGetUserMedia("video", {}) did not throw exception.
+PASS navigator.webkitGetUserMedia("video", objectThrowingException) did not throw exception.
PASS navigator.webkitGetUserMedia("video", true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.webkitGetUserMedia("video", 42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.webkitGetUserMedia("video", Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
@@ -40,9 +40,9 @@
PASS navigator.webkitGetUserMedia("audio, video user", emptyFunction, undefined) did not throw exception.
PASS navigator.webkitGetUserMedia("audio, video environment", emptyFunction, undefined) did not throw exception.
PASS navigator.webkitGetUserMedia("video", emptyFunction, "video") threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia("video", emptyFunction, null) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia("video", emptyFunction, {}) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
-PASS navigator.webkitGetUserMedia("video", emptyFunction, objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
+PASS navigator.webkitGetUserMedia("video", emptyFunction, null) did not throw exception.
+PASS navigator.webkitGetUserMedia("video", emptyFunction, {}) did not throw exception.
+PASS navigator.webkitGetUserMedia("video", emptyFunction, objectThrowingException) did not throw exception.
PASS navigator.webkitGetUserMedia("video", emptyFunction, true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.webkitGetUserMedia("video", emptyFunction, 42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
PASS navigator.webkitGetUserMedia("video", emptyFunction, Infinity) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
Modified: trunk/LayoutTests/fast/dom/MediaStream/script-tests/argument-types.js (107539 => 107540)
--- trunk/LayoutTests/fast/dom/MediaStream/script-tests/argument-types.js 2012-02-13 08:10:08 UTC (rev 107539)
+++ trunk/LayoutTests/fast/dom/MediaStream/script-tests/argument-types.js 2012-02-13 08:17:59 UTC (rev 107540)
@@ -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 "TypeError: Not enough arguments"; })();');
} else {
shouldNotThrow(_expression_);
}
@@ -23,6 +23,7 @@
var toStringError = new Error('toString threw exception');
var notSupportedError = new Error('NOT_SUPPORTED_ERR: DOM Exception 9');
+var typeMismatchError = new Error('TYPE_MISMATCH_ERR: DOM Exception 17');
var emptyFunction = function() {};
function ObjectThrowingException() {};
@@ -38,7 +39,7 @@
test('navigator.webkitGetUserMedia(undefined)', true);
test('navigator.webkitGetUserMedia(null)', true);
test('navigator.webkitGetUserMedia({})', true);
-test('navigator.webkitGetUserMedia(objectThrowingException)', true, toStringError);
+test('navigator.webkitGetUserMedia(objectThrowingException)', true);
test('navigator.webkitGetUserMedia("video")', true);
test('navigator.webkitGetUserMedia(true)', true);
test('navigator.webkitGetUserMedia(42)', true);
@@ -58,15 +59,15 @@
test('navigator.webkitGetUserMedia(-Infinity, emptyFunction)', true, notSupportedError);
test('navigator.webkitGetUserMedia(emptyFunction, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia("video", "video")', true);
-test('navigator.webkitGetUserMedia("video", undefined)', true);
-test('navigator.webkitGetUserMedia("video", null)', true);
-test('navigator.webkitGetUserMedia("video", {})', true);
-test('navigator.webkitGetUserMedia("video", objectThrowingException)', true);
-test('navigator.webkitGetUserMedia("video", true)', true);
-test('navigator.webkitGetUserMedia("video", 42)', true);
-test('navigator.webkitGetUserMedia("video", Infinity)', true);
-test('navigator.webkitGetUserMedia("video", -Infinity)', true);
+test('navigator.webkitGetUserMedia("video", "video")', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", undefined)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", null)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", {})', false);
+test('navigator.webkitGetUserMedia("video", objectThrowingException)', false);
+test('navigator.webkitGetUserMedia("video", true)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", 42)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", Infinity)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", -Infinity)', true, typeMismatchError);
// 3 Arguments.
test('navigator.webkitGetUserMedia("video", emptyFunction, emptyFunction)', false);
@@ -75,13 +76,13 @@
test('navigator.webkitGetUserMedia("audio, somethingelse,,video", emptyFunction, undefined)', false);
test('navigator.webkitGetUserMedia("audio, video user", emptyFunction, undefined)', false);
test('navigator.webkitGetUserMedia("audio, video environment", emptyFunction, undefined)', false);
-test('navigator.webkitGetUserMedia("video", emptyFunction, "video")', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, null)', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, {})', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, objectThrowingException)', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, true)', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, 42)', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, Infinity)', true);
-test('navigator.webkitGetUserMedia("video", emptyFunction, -Infinity)', true);
+test('navigator.webkitGetUserMedia("video", emptyFunction, "video")', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", emptyFunction, null)', false );
+test('navigator.webkitGetUserMedia("video", emptyFunction, {})', false);
+test('navigator.webkitGetUserMedia("video", emptyFunction, objectThrowingException)', false);
+test('navigator.webkitGetUserMedia("video", emptyFunction, true)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", emptyFunction, 42)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", emptyFunction, Infinity)', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", emptyFunction, -Infinity)', true, typeMismatchError);
window.jsTestIsAsync = false;