[common][gumallow][DPTTIZEN-2979, modify to get audio stream with optional constraints] 85/166385/3
authorwei.ji <wei.ji@samsung.com>
Wed, 10 Jan 2018 03:04:43 +0000 (11:04 +0800)
committerwei.ji <wei.ji@samsung.com>
Wed, 10 Jan 2018 05:38:20 +0000 (13:38 +0800)
- Impacted TC num(approved): New 0, Update 1, Delete 0
- mobile: get audio and video stream
- wearable: get audio stream
- tv: get audio and video stream

Change-Id: I0777f2ffa594349384175fd6c28e7362953fdb46
Signed-off-by: wei.ji <wei.ji@samsung.com>
common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-audio-optional-constraint.html [new file with mode: 0755]
common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-optional-constraint.html [deleted file]
common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-video-optional-constraint.html [new file with mode: 0755]
common/tct-gumallow-w3c-tests/tests.xml

diff --git a/common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-audio-optional-constraint.html b/common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-audio-optional-constraint.html
new file mode 100755 (executable)
index 0000000..e3ee179
--- /dev/null
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<title>Optional constraint recognized as optional in getUserMedia</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-NavigatorUserMedia-getUserMedia-void-MediaStreamConstraints-constraints-NavigatorUserMediaSuccessCallback-successCallback-NavigatorUserMediaErrorCallback-errorCallback">
+<link rel='stylesheet' href='../../../../resources/testharness.css' media='all'/>
+</head>
+<body>
+<p class="instructions">When prompted, accept to share your audio stream.</p>
+<h1 class="instructions">Description</h1>
+<p class="instructions">This test checks that setting an optional constraint in
+getUserMedia is handled as optional</p>
+
+<div id='log'></div>
+<script src=../../../../resources/testharness.js></script>
+<script src=../../../../resources/testharnessreport.js></script>
+<script src="../../vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]'></script>
+<script>
+var t = async_test("Tests that setting an optional constraint in getUserMedia is handled as optional", {timeout:10000});
+t.step(function() {
+  navigator.getUserMedia({audio: {optional: [{sampleSize:8}, {echoCancellation:true}]}},
+      t.step_func(function (stream) {
+        assert_equals(stream.getAudioTracks().length, 1, "the media stream has exactly one audio track");
+        t.done();
+      }),
+      t.step_func(function(error) {
+        assert_unreached("an optional constraint can't stop us from obtaining a audio stream");
+      }));
+});
+</script>
+</body>
+</html>
diff --git a/common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-optional-constraint.html b/common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-optional-constraint.html
deleted file mode 100755 (executable)
index cade370..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html>
-<html>
-<head>
-<title>Optional constraint recognized as optional in getUserMedia</title>
-<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
-<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-NavigatorUserMedia-getUserMedia-void-MediaStreamConstraints-constraints-NavigatorUserMediaSuccessCallback-successCallback-NavigatorUserMediaErrorCallback-errorCallback">
-<link rel='stylesheet' href='../../../../resources/testharness.css' media='all'/>
-</head>
-<body>
-<p class="instructions">When prompted, accept to share your video stream.</p>
-<h1 class="instructions">Description</h1>
-<p class="instructions">This test checks that setting an optional constraint in
-getUserMedia is handled as optional</p>
-
-<div id='log'></div>
-<script src=../../../../resources/testharness.js></script>
-<script src=../../../../resources/testharnessreport.js></script>
-<script src="../../vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]'></script>
-<script>
-var t = async_test("Tests that setting an optional constraint in getUserMedia is handled as optional", {timeout:10000});
-t.step(function() {
-  navigator.getUserMedia({video: {optional: [{width: {min:1024}}, {width: {max: 800}}]}},
-      t.step_func(function (stream) {
-        assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
-        t.done();
-      }),
-      t.step_func(function(error) {
-        assert_unreached("an optional constraint can't stop us from obtaining a video stream");
-      }));
-});
-</script>
-</body>
-</html>
diff --git a/common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-video-optional-constraint.html b/common/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-video-optional-constraint.html
new file mode 100755 (executable)
index 0000000..cade370
--- /dev/null
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<title>Optional constraint recognized as optional in getUserMedia</title>
+<link rel="author" title="Dominique Hazael-Massieux" href="mailto:dom@w3.org"/>
+<link rel="help" href="http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-NavigatorUserMedia-getUserMedia-void-MediaStreamConstraints-constraints-NavigatorUserMediaSuccessCallback-successCallback-NavigatorUserMediaErrorCallback-errorCallback">
+<link rel='stylesheet' href='../../../../resources/testharness.css' media='all'/>
+</head>
+<body>
+<p class="instructions">When prompted, accept to share your video stream.</p>
+<h1 class="instructions">Description</h1>
+<p class="instructions">This test checks that setting an optional constraint in
+getUserMedia is handled as optional</p>
+
+<div id='log'></div>
+<script src=../../../../resources/testharness.js></script>
+<script src=../../../../resources/testharnessreport.js></script>
+<script src="../../vendor-prefix.js" data-prefixed-objects='[{"ancestors":["navigator"], "name":"getUserMedia"}]'></script>
+<script>
+var t = async_test("Tests that setting an optional constraint in getUserMedia is handled as optional", {timeout:10000});
+t.step(function() {
+  navigator.getUserMedia({video: {optional: [{width: {min:1024}}, {width: {max: 800}}]}},
+      t.step_func(function (stream) {
+        assert_equals(stream.getVideoTracks().length, 1, "the media stream has exactly one video track");
+        t.done();
+      }),
+      t.step_func(function(error) {
+        assert_unreached("an optional constraint can't stop us from obtaining a video stream");
+      }));
+});
+</script>
+</body>
+</html>
index f6cac5a992ed6026a7a03b5fc9d2b2823c5a734d..e9ed794a67bd7415bf02c675712ba63053d12b69 100755 (executable)
@@ -2,6 +2,26 @@
 <?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
 <test_definition>
   <suite name="tct-gumallow-w3c-tests" category="W3C/HTML5 APIs">
+    <set name="Gumallow_mobile" type="js">
+      <capabilities>
+        <capability name="http://tizen.org/feature/profile"><value>MOBILE_FULL</value></capability>
+      </capabilities>
+      <testcase component="W3C_HTML5 APIs/Media/getUserMedia" execution_type="auto" id="getusermedia-video-optional-constraint" purpose="Test checks that setting an optional constraint in getUserMedia is handled as optional">
+        <description>
+          <test_script_entry>/opt/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-video-optional-constraint.html?usePrefixes=1</test_script_entry>
+        </description>
+      </testcase>
+    </set>
+    <set name="Gumallow_tv" type="js">
+      <capabilities>
+        <capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
+      </capabilities>
+      <testcase component="W3C_HTML5 APIs/Media/getUserMedia" execution_type="auto" id="getusermedia-video-optional-constraint" purpose="Test checks that setting an optional constraint in getUserMedia is handled as optional">
+        <description>
+          <test_script_entry>/opt/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-video-optional-constraint.html?usePrefixes=1</test_script_entry>
+        </description>
+      </testcase>
+    </set>
     <set name="GetUserMedia" type="js">
       <capabilities>
         <capability name="http://tizen.org/feature/camera"/>
           <test_script_entry>/opt/tct-gumallow-w3c-tests/gumallow/w3c/stream-api/mediastreamtrack/mediastreamtrack-id-manual.html?usePrefixes=1</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/Media/getUserMedia" execution_type="auto" id="getusermedia-optional-constraint" purpose="Test checks that setting an optional constraint in getUserMedia is handled as optional">
+      <testcase component="W3C_HTML5 APIs/Media/getUserMedia" execution_type="auto" id="getusermedia-audio-optional-constraint" purpose="Test checks that setting an optional constraint in getUserMedia is handled as optional">
         <description>
-          <test_script_entry>/opt/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-optional-constraint.html?usePrefixes=1</test_script_entry>
+          <test_script_entry>/opt/tct-gumallow-w3c-tests/gumallow/w3c/obtaining-local-multimedia-content/navigatorusermedia/getusermedia-audio-optional-constraint.html?usePrefixes=1</test_script_entry>
         </description>
       </testcase>
       <testcase component="W3C_HTML5 APIs/Media/getUserMedia" execution_type="manual" id="audio" purpose="Test checks that the MediaStream object returned by the success callback in getUserMedia has exactly one audio track">