MediaStream API: Moving LT/fast/dom/MediaStream/* to LT/fast/mediastream
authortommyw@google.com <tommyw@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 19:47:10 +0000 (19:47 +0000)
committertommyw@google.com <tommyw@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Apr 2012 19:47:10 +0000 (19:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82870

Reviewed by Dimitri Glazkov.

* fast/dom/MediaStream/script-tests/argument-types.js: Removed.
* fast/mediastream/argument-types-expected.txt: Renamed from LayoutTests/fast/dom/MediaStream/argument-types-expected.txt.
* fast/mediastream/argument-types.html: Renamed from LayoutTests/fast/dom/MediaStream/argument-types.html.
* fast/mediastream/enabled-expected.txt: Renamed from LayoutTests/fast/dom/MediaStream/enabled-expected.txt.
* fast/mediastream/enabled.html: Renamed from LayoutTests/fast/dom/MediaStream/enabled.html.
* fast/mediastream/no-interface-object-expected.txt: Renamed from LayoutTests/fast/dom/MediaStream/no-interface-object-expected.txt.
* fast/mediastream/no-interface-object.html: Renamed from LayoutTests/fast/dom/MediaStream/no-interface-object.html.
* fast/mediastream/peerconnection-Attributes.html:
* fast/mediastream/peerconnection-argument-types.html:
* fast/mediastream/script-tests/argument-types.js:
(test):
* fast/mediastream/script-tests/enabled.js: Renamed from LayoutTests/fast/dom/MediaStream/script-tests/enabled.js.
(hasGetUserMediaProperty):
* fast/mediastream/script-tests/no-interface-object.js: Renamed from LayoutTests/fast/dom/MediaStream/script-tests/no-interface-object.js.
(shouldThrowReferenceError):
(test):
* fast/mediastream/script-tests/peerconnection-Attributes.js: Renamed from LayoutTests/fast/mediastream/script-tests/Attributes.js.
(shouldNotThrow):
(test):
(shouldBeA):
(shouldBeTrueA):
(emptyFunction):
(ObjectThrowingException.prototype.toString):
(gotStream):
(gotStreamFailed):
* fast/mediastream/script-tests/peerconnection-argument-types.js: Copied from LayoutTests/fast/mediastream/script-tests/argument-types.js.
(shouldNotThrow):
(test):
(emptyFunction):
(ObjectThrowingException.prototype.toString):
* platform/efl/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wincairo/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115098 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/MediaStream/script-tests/argument-types.js [deleted file]
LayoutTests/fast/mediastream/argument-types-expected.txt [moved from LayoutTests/fast/dom/MediaStream/argument-types-expected.txt with 100% similarity]
LayoutTests/fast/mediastream/argument-types.html [moved from LayoutTests/fast/dom/MediaStream/argument-types.html with 55% similarity]
LayoutTests/fast/mediastream/enabled-expected.txt [moved from LayoutTests/fast/dom/MediaStream/enabled-expected.txt with 100% similarity]
LayoutTests/fast/mediastream/enabled.html [moved from LayoutTests/fast/dom/MediaStream/enabled.html with 54% similarity]
LayoutTests/fast/mediastream/no-interface-object-expected.txt [moved from LayoutTests/fast/dom/MediaStream/no-interface-object-expected.txt with 100% similarity]
LayoutTests/fast/mediastream/no-interface-object.html [moved from LayoutTests/fast/dom/MediaStream/no-interface-object.html with 56% similarity]
LayoutTests/fast/mediastream/peerconnection-Attributes.html
LayoutTests/fast/mediastream/peerconnection-argument-types.html
LayoutTests/fast/mediastream/script-tests/argument-types.js
LayoutTests/fast/mediastream/script-tests/enabled.js [moved from LayoutTests/fast/dom/MediaStream/script-tests/enabled.js with 100% similarity]
LayoutTests/fast/mediastream/script-tests/no-interface-object.js [moved from LayoutTests/fast/dom/MediaStream/script-tests/no-interface-object.js with 100% similarity]
LayoutTests/fast/mediastream/script-tests/peerconnection-Attributes.js [moved from LayoutTests/fast/mediastream/script-tests/Attributes.js with 100% similarity]
LayoutTests/fast/mediastream/script-tests/peerconnection-argument-types.js [new file with mode: 0644]
LayoutTests/platform/efl/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
LayoutTests/platform/wincairo/Skipped

index 0c2f3bc..0f83560 100644 (file)
@@ -1,3 +1,46 @@
+2012-04-24  Tommy Widenflycht  <tommyw@google.com>
+
+        MediaStream API: Moving LT/fast/dom/MediaStream/* to LT/fast/mediastream
+        https://bugs.webkit.org/show_bug.cgi?id=82870
+
+        Reviewed by Dimitri Glazkov.
+
+        * fast/dom/MediaStream/script-tests/argument-types.js: Removed.
+        * fast/mediastream/argument-types-expected.txt: Renamed from LayoutTests/fast/dom/MediaStream/argument-types-expected.txt.
+        * fast/mediastream/argument-types.html: Renamed from LayoutTests/fast/dom/MediaStream/argument-types.html.
+        * fast/mediastream/enabled-expected.txt: Renamed from LayoutTests/fast/dom/MediaStream/enabled-expected.txt.
+        * fast/mediastream/enabled.html: Renamed from LayoutTests/fast/dom/MediaStream/enabled.html.
+        * fast/mediastream/no-interface-object-expected.txt: Renamed from LayoutTests/fast/dom/MediaStream/no-interface-object-expected.txt.
+        * fast/mediastream/no-interface-object.html: Renamed from LayoutTests/fast/dom/MediaStream/no-interface-object.html.
+        * fast/mediastream/peerconnection-Attributes.html:
+        * fast/mediastream/peerconnection-argument-types.html:
+        * fast/mediastream/script-tests/argument-types.js:
+        (test):
+        * fast/mediastream/script-tests/enabled.js: Renamed from LayoutTests/fast/dom/MediaStream/script-tests/enabled.js.
+        (hasGetUserMediaProperty):
+        * fast/mediastream/script-tests/no-interface-object.js: Renamed from LayoutTests/fast/dom/MediaStream/script-tests/no-interface-object.js.
+        (shouldThrowReferenceError):
+        (test):
+        * fast/mediastream/script-tests/peerconnection-Attributes.js: Renamed from LayoutTests/fast/mediastream/script-tests/Attributes.js.
+        (shouldNotThrow):
+        (test):
+        (shouldBeA):
+        (shouldBeTrueA):
+        (emptyFunction):
+        (ObjectThrowingException.prototype.toString):
+        (gotStream):
+        (gotStreamFailed):
+        * fast/mediastream/script-tests/peerconnection-argument-types.js: Copied from LayoutTests/fast/mediastream/script-tests/argument-types.js.
+        (shouldNotThrow):
+        (test):
+        (emptyFunction):
+        (ObjectThrowingException.prototype.toString):
+        * platform/efl/Skipped:
+        * platform/mac/Skipped:
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+        * platform/wincairo/Skipped:
+
 2012-04-24  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Failure to allocate ArrayStorage in emit_op_new_array leads to poisonous JSArray
diff --git a/LayoutTests/fast/dom/MediaStream/script-tests/argument-types.js b/LayoutTests/fast/dom/MediaStream/script-tests/argument-types.js
deleted file mode 100644 (file)
index 8243ce9..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-description("Tests the acceptable types for arguments to navigator.getUserMedia methods.");
-
-function shouldNotThrow(expression)
-{
-  try {
-    eval(expression);
-    testPassed(expression + " did not throw exception.");
-  } catch(e) {
-    testFailed(expression + " should not throw exception. Threw exception " + e);
-  }
-}
-
-function test(expression, expressionShouldThrow, expectedException) {
-    if (expressionShouldThrow) {
-        if (expectedException)
-            shouldThrow(expression, '(function() { return "' + expectedException + '"; })();');
-        else
-            shouldThrow(expression, '(function() { return "TypeError: Not enough arguments"; })();');
-    } else {
-        shouldNotThrow(expression);
-    }
-}
-
-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() {};
-ObjectThrowingException.prototype.toString = function() {
-    throw toStringError;
-}
-var objectThrowingException = new ObjectThrowingException();
-
-// No arguments
-test('navigator.webkitGetUserMedia()', true);
-
-// 1 Argument (getUserMedia requires at least 2 arguments).
-test('navigator.webkitGetUserMedia(undefined)', true);
-test('navigator.webkitGetUserMedia(null)', true);
-test('navigator.webkitGetUserMedia({})', true);
-test('navigator.webkitGetUserMedia(objectThrowingException)', true);
-test('navigator.webkitGetUserMedia("video")', true);
-test('navigator.webkitGetUserMedia(true)', true);
-test('navigator.webkitGetUserMedia(42)', true);
-test('navigator.webkitGetUserMedia(Infinity)', true);
-test('navigator.webkitGetUserMedia(-Infinity)', true);
-test('navigator.webkitGetUserMedia(emptyFunction)', true);
-
-// 2 Arguments.
-test('navigator.webkitGetUserMedia("video", emptyFunction)', false);
-test('navigator.webkitGetUserMedia(undefined, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia(null, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia({}, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia(objectThrowingException, emptyFunction)', true, toStringError);
-test('navigator.webkitGetUserMedia(true, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia(42, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia(Infinity, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia(-Infinity, emptyFunction)', true, notSupportedError);
-test('navigator.webkitGetUserMedia(emptyFunction, emptyFunction)', true, notSupportedError);
-
-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", {})', true, typeMismatchError);
-test('navigator.webkitGetUserMedia("video", objectThrowingException)', true, typeMismatchError);
-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);
-test('navigator.webkitGetUserMedia("video", emptyFunction, undefined)', false);
-test('navigator.webkitGetUserMedia("audio, video", emptyFunction, undefined)', false);
-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, typeMismatchError);
-test('navigator.webkitGetUserMedia("video", emptyFunction, null)', false );
-test('navigator.webkitGetUserMedia("video", emptyFunction, {})', true, typeMismatchError);
-test('navigator.webkitGetUserMedia("video", emptyFunction, objectThrowingException)', true, typeMismatchError);
-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;
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
 </head>
 <body>
 <script src="script-tests/argument-types.js"></script>
-<script src="../../js/resources/js-test-post.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
 </body>
 </html>
similarity index 54%
rename from LayoutTests/fast/dom/MediaStream/enabled.html
rename to LayoutTests/fast/mediastream/enabled.html
index 9a8c3aa..49331c9 100644 (file)
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
 </head>
 <body>
 <script src="script-tests/enabled.js"></script>
-<script src="../../js/resources/js-test-post.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
 </body>
 </html>
@@ -1,10 +1,10 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../js/resources/js-test-pre.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
 </head>
 <body>
 <script src="script-tests/no-interface-object.js"></script>
-<script src="../../js/resources/js-test-post.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
 </body>
 </html>
index 7120d89..40fdb3d 100644 (file)
@@ -7,7 +7,7 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/Attributes.js"></script>
+<script src="script-tests/peerconnection-Attributes.js"></script>
 <script src="../js/resources/js-test-post.js"></script>
 </body>
 </html>
index c1e67eb..b468bab 100644 (file)
@@ -7,7 +7,7 @@
 <body>
 <p id="description"></p>
 <div id="console"></div>
-<script src="script-tests/argument-types.js"></script>
+<script src="script-tests/peerconnection-argument-types.js"></script>
 <script src="../js/resources/js-test-post.js"></script>
 </body>
 </html>
index 9d04b2c..8243ce9 100644 (file)
@@ -1,4 +1,4 @@
-description("Tests the acceptable types for arguments to method for DeprecatedPeerConnection defination.");
+description("Tests the acceptable types for arguments to navigator.getUserMedia methods.");
 
 function shouldNotThrow(expression)
 {
@@ -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 "TypeError: Not enough arguments"; })();');
     } else {
         shouldNotThrow(expression);
     }
@@ -23,6 +23,7 @@ function test(expression, expressionShouldThrow, expectedException) {
 
 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() {};
@@ -31,59 +32,57 @@ ObjectThrowingException.prototype.toString = function() {
 }
 var objectThrowingException = new ObjectThrowingException();
 
-shouldBeTrue("typeof webkitDeprecatedPeerConnection== 'function'");
+// No arguments
+test('navigator.webkitGetUserMedia()', true);
 
-// 0 Argument
-test('new webkitDeprecatedPeerConnection()', true,'TypeError: Not enough arguments');
+// 1 Argument (getUserMedia requires at least 2 arguments).
+test('navigator.webkitGetUserMedia(undefined)', true);
+test('navigator.webkitGetUserMedia(null)', true);
+test('navigator.webkitGetUserMedia({})', true);
+test('navigator.webkitGetUserMedia(objectThrowingException)', true);
+test('navigator.webkitGetUserMedia("video")', true);
+test('navigator.webkitGetUserMedia(true)', true);
+test('navigator.webkitGetUserMedia(42)', true);
+test('navigator.webkitGetUserMedia(Infinity)', true);
+test('navigator.webkitGetUserMedia(-Infinity)', true);
+test('navigator.webkitGetUserMedia(emptyFunction)', true);
 
-// 1 Argument (new webkitDeprecatedPeerConnection requires at least 2 arguments).
-test('new webkitDeprecatedPeerConnection("STUN 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUN relay.example.net:3478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUN example.net")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUNS 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUNS relay.example.net:3478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUNS example.net")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURN 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURN relay.example.net:3478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURN example.net")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURNS 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURNS relay.example.net:3478")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURNS example.net")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURN NONE")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("TURNS NONE")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUN NONE")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("STUNS NONE")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("undefined")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection("null")', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection({})', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection(42)', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection(Infinity)', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection(-Infinity)', true, 'TypeError: Not enough arguments');
-test('new webkitDeprecatedPeerConnection(emptyFunction)', true, 'TypeError: Not enough arguments');
-
-//2 Argument
-test('new webkitDeprecatedPeerConnection("STUN 203.0.113.2:2478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("STUN relay.example.net:3478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("STUN example.net",emptyFunction)',false);
-test('new webkitDeprecatedPeerConnection("STUNS 203.0.113.2:2478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("STUNS relay.example.net:3478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("STUNS example.net",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURN 203.0.113.2:2478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURN relay.example.net:3478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURN example.net",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURNS 203.0.113.2:2478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURNS relay.example.net:3478",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURNS example.net",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURN NONE",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURNS NONE",emptyFunction)',false);
-test('new webkitDeprecatedPeerConnection("STUN NONE",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("STUNS NONE",emptyFunction)', false);
-test('new webkitDeprecatedPeerConnection("TURN NONE",undefined)',  true);
-test('new webkitDeprecatedPeerConnection("TURNS NONE",{})', true);
-test('new webkitDeprecatedPeerConnection("STUN NONE",42)',  true);
-test('new webkitDeprecatedPeerConnection("STUNS NONE",Infinity)', true);
-test('new webkitDeprecatedPeerConnection("STUNS NONE",-Infinity)', true);
+// 2 Arguments.
+test('navigator.webkitGetUserMedia("video", emptyFunction)', false);
+test('navigator.webkitGetUserMedia(undefined, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia(null, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia({}, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia(objectThrowingException, emptyFunction)', true, toStringError);
+test('navigator.webkitGetUserMedia(true, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia(42, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia(Infinity, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia(-Infinity, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia(emptyFunction, emptyFunction)', true, notSupportedError);
 
+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", {})', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", objectThrowingException)', true, typeMismatchError);
+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);
+test('navigator.webkitGetUserMedia("video", emptyFunction, undefined)', false);
+test('navigator.webkitGetUserMedia("audio, video", emptyFunction, undefined)', false);
+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, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", emptyFunction, null)', false );
+test('navigator.webkitGetUserMedia("video", emptyFunction, {})', true, typeMismatchError);
+test('navigator.webkitGetUserMedia("video", emptyFunction, objectThrowingException)', true, typeMismatchError);
+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;
diff --git a/LayoutTests/fast/mediastream/script-tests/peerconnection-argument-types.js b/LayoutTests/fast/mediastream/script-tests/peerconnection-argument-types.js
new file mode 100644 (file)
index 0000000..9d04b2c
--- /dev/null
@@ -0,0 +1,89 @@
+description("Tests the acceptable types for arguments to method for DeprecatedPeerConnection defination.");
+
+function shouldNotThrow(expression)
+{
+  try {
+    eval(expression);
+    testPassed(expression + " did not throw exception.");
+  } catch(e) {
+    testFailed(expression + " should not throw exception. Threw exception " + e);
+  }
+}
+
+function test(expression, expressionShouldThrow, expectedException) {
+    if (expressionShouldThrow) {
+        if (expectedException)
+            shouldThrow(expression, '(function() { return "' + expectedException + '"; })();');
+        else
+            shouldThrow(expression, '(function() { return "Error: TYPE_MISMATCH_ERR: DOM Exception 17"; })();');
+    } else {
+        shouldNotThrow(expression);
+    }
+}
+
+var toStringError = new Error('toString threw exception');
+var notSupportedError = new Error('NOT_SUPPORTED_ERR: DOM Exception 9');
+var emptyFunction = function() {};
+
+function ObjectThrowingException() {};
+ObjectThrowingException.prototype.toString = function() {
+    throw toStringError;
+}
+var objectThrowingException = new ObjectThrowingException();
+
+shouldBeTrue("typeof webkitDeprecatedPeerConnection== 'function'");
+
+// 0 Argument
+test('new webkitDeprecatedPeerConnection()', true,'TypeError: Not enough arguments');
+
+// 1 Argument (new webkitDeprecatedPeerConnection requires at least 2 arguments).
+test('new webkitDeprecatedPeerConnection("STUN 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUN relay.example.net:3478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUN example.net")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUNS 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUNS relay.example.net:3478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUNS example.net")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURN 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURN relay.example.net:3478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURN example.net")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURNS 203.0.113.2:2478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURNS relay.example.net:3478")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURNS example.net")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURN NONE")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("TURNS NONE")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUN NONE")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("STUNS NONE")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("undefined")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection("null")', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection({})', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection(42)', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection(Infinity)', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection(-Infinity)', true, 'TypeError: Not enough arguments');
+test('new webkitDeprecatedPeerConnection(emptyFunction)', true, 'TypeError: Not enough arguments');
+
+//2 Argument
+test('new webkitDeprecatedPeerConnection("STUN 203.0.113.2:2478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("STUN relay.example.net:3478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("STUN example.net",emptyFunction)',false);
+test('new webkitDeprecatedPeerConnection("STUNS 203.0.113.2:2478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("STUNS relay.example.net:3478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("STUNS example.net",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURN 203.0.113.2:2478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURN relay.example.net:3478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURN example.net",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURNS 203.0.113.2:2478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURNS relay.example.net:3478",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURNS example.net",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURN NONE",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURNS NONE",emptyFunction)',false);
+test('new webkitDeprecatedPeerConnection("STUN NONE",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("STUNS NONE",emptyFunction)', false);
+test('new webkitDeprecatedPeerConnection("TURN NONE",undefined)',  true);
+test('new webkitDeprecatedPeerConnection("TURNS NONE",{})', true);
+test('new webkitDeprecatedPeerConnection("STUN NONE",42)',  true);
+test('new webkitDeprecatedPeerConnection("STUNS NONE",Infinity)', true);
+test('new webkitDeprecatedPeerConnection("STUNS NONE",-Infinity)', true);
+
+
+
+window.jsTestIsAsync = false;
index 2c0b18f..59e1228 100644 (file)
@@ -773,7 +773,7 @@ fast/frames/location-redirect-user-gesture.html
 fast/frames/meta-refresh-user-gesture.html
 
 # The EFL port has no support for usermedia
-fast/dom/MediaStream
+fast/mediastream
 
 # The EFL port has no support for the Fullscreen API
 fullscreen
@@ -1724,11 +1724,6 @@ fast/lists/ol-reversed-simple.xhtml
 fast/loader/local-CSS-from-local.html
 fast/loader/local-JavaScript-from-local.html
 fast/loader/local-image-from-local.html
-fast/mediastream/peerconnection-Attributes.html
-fast/mediastream/peerconnection-addstream.html
-fast/mediastream/peerconnection-argument-types.html
-fast/mediastream/peerconnection-eventlistener-optional-argument.html
-fast/mediastream/peerconnection-removestream.html
 fast/multicol
 fast/overflow/overflow-float-stacking.html
 fast/overflow/overflow-stacking.html
index 99b7f35..f1a8324 100644 (file)
@@ -237,7 +237,6 @@ fast/speech
 fast/events/constructors/speech-recognition-event-constructor.html
 
 # Media Stream API is not yet enabled.
-fast/dom/MediaStream
 fast/mediastream
 
 # Needs to be fixed at image decoder layer for Safari.
index 95fa22a..7f659d5 100644 (file)
@@ -95,7 +95,6 @@ fast/speech
 fast/events/constructors/speech-recognition-event-constructor.html
 
 # ENABLE(MEDIA_STREAM) is disabled.
-fast/dom/MediaStream
 fast/mediastream
 
 # ENABLE(DIRECTORY_UPLOAD) is disabled.
index feec0c6..d9fbc12 100644 (file)
@@ -1187,7 +1187,7 @@ fast/speech
 fast/events/constructors/speech-recognition-event-constructor.html
 
 # Media Stream API is not yet enabled.
-fast/dom/MediaStream
+fast/mediastream
 
 # Needs to be fixed at image decoder layer for Safari.
 fast/images/large-size-image-crash.html
index f6938c8..3653788 100644 (file)
@@ -1699,7 +1699,7 @@ fast/speech
 fast/events/constructors/speech-recognition-event-constructor.html
 
 # Media Stream API is not yet enabled.
-fast/dom/MediaStream
+fast/mediastream
 
 # Needs to be fixed at image decoder layer for Safari.
 fast/images/large-size-image-crash.html