[common][sound][fix tc issue] 12/132312/1
authoryuanzhongyuan <zy123.yuan@samsung.com>
Fri, 2 Jun 2017 07:27:39 +0000 (15:27 +0800)
committeryuanzhongyuan <zy123.yuan@samsung.com>
Fri, 2 Jun 2017 07:27:46 +0000 (15:27 +0800)
Change-Id: I72824437bf95f94c1c705f0802540257fd371fbf

common/tct-sound-tizen-tests/sound/SoundManager_getActivatedDeviceList.html
common/tct-sound-tizen-tests/tests.xml

index 65bac30238417dd0783efe5550453571a6a72d81..9492e4ef0c8b0cee36ed2e74468ae7ef71b10696 100755 (executable)
@@ -31,29 +31,15 @@ Authors:
 //==== LABEL Check if soundManager::getActivatedDeviceList() method can be called
 //==== SPEC Tizen Web API:Multimedia:Sound:SoundManager:getActivatedDeviceList M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/sound.html
-//==== ONLOAD_DELAY 20
-//==== EXECUTION_TYPE manual
-//==== PRE Before Click run, make sure earphone is plugged in and music is played
 //==== PRIORITY: P1
 //==== TEST_CRITERIA MR MNA
 
-setup({timeout: 20000});
-
-var t = async_test(document.title, {timeout: 20000}), changeCallback, retValue = null;
-
-t.step(function () {
-    changeCallback = t.step_func(function (info) {
-        alert("Play music and turn off this alert");
-        retValue = tizen.sound.getActivatedDeviceList();
-        assert_type(retValue, "array", "method should return array type");
-        assert_type(retValue[0], "object", "value should be object");
-        t.done();
-    });
-
-    tizen.sound.addDeviceStateChangeListener(changeCallback);
-
-});
+test(function () {
+    retValue = tizen.sound.getActivatedDeviceList();
+    assert_type(retValue, "array", "method should return array type");
+    assert_type(retValue[0], "object", "value should be object");
+}, document.title);
 
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 321bd4420c96054b2a9dd4ba14ad3acde96b7377..63dc2ec01315e3bf9178ff793bdb1a151647cb5c 100755 (executable)
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_addDeviceStateChangeListener_misarg.html</test_script_entry>
         </description>
       </testcase>
-      <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_getActivatedDeviceList" onload_delay="20" priority="P1" purpose="Check if SoundManager::getActivatedDeviceList() method can be called">
+      <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_getActivatedDeviceList" priority="P1" purpose="Check if SoundManager::getActivatedDeviceList() method can be called">
         <description>
-          <pre_condition>Before Click run, make sure earphone is plugged in target. After Click run, play the music</pre_condition>
-          <steps>
-            <step order="1">
-              <step_desc>Plug in earphone and play music</step_desc>
-              <expected>Pass</expected>
-            </step>
-          </steps>
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getActivatedDeviceList.html</test_script_entry>
         </description>
       </testcase>
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_addDeviceStateChangeListener_misarg.html</test_script_entry>
         </description>
       </testcase>
-      <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_getActivatedDeviceList" onload_delay="20" priority="P1" purpose="Check if SoundManager::getActivatedDeviceList() method can be called">
+      <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_getActivatedDeviceList" priority="P1" purpose="Check if SoundManager::getActivatedDeviceList() method can be called">
         <description>
-          <pre_condition>Before Click run, bluetooth headset should be not connected with target. After Click run, make sure bluetooth headset connection with target</pre_condition>
-          <steps>
-            <step order="1">
-              <step_desc>Before turn off the alert, play music</step_desc>
-              <expected>Pass</expected>
-            </step>
-          </steps>
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getActivatedDeviceList.html</test_script_entry>
         </description>
       </testcase>
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_addDeviceStateChangeListener_misarg.html</test_script_entry>
         </description>
       </testcase>
+      <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_getActivatedDeviceList" priority="P1" purpose="Check if SoundManager::getActivatedDeviceList() method can be called">
+        <description>
+          <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getActivatedDeviceList.html</test_script_entry>
+        </description>
+      </testcase>
       <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="auto" id="SoundManager_getActivatedDeviceList_exist" priority="P0" purpose="Check if SoundManager::getActivatedDeviceList() method exists">
         <description>
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getActivatedDeviceList_exist.html</test_script_entry>
           <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_addDeviceStateChangeListener.html</test_script_entry>
         </description>
       </testcase>
-      <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_getActivatedDeviceList" onload_delay="20" priority="P1" purpose="Check if SoundManager::getActivatedDeviceList() method can be called">
-        <description>
-          <pre_condition>Before Click run, bluetooth headset should be not connected with target. After Click run, make sure bluetooth headset connection with target</pre_condition>
-          <steps>
-            <step order="1">
-              <step_desc>Before turn off the alert, play music</step_desc>
-              <expected>Pass</expected>
-            </step>
-          </steps>
-          <test_script_entry>/opt/tct-sound-tizen-tests/sound/SoundManager_getActivatedDeviceList.html</test_script_entry>
-        </description>
-      </testcase>
       <testcase component="Tizen Device APIs/Multimedia/Sound" execution_type="manual" id="SoundManager_getConnectedDeviceList" onload_delay="20" priority="P1" purpose="Check if SoundManager::getConnectedDeviceList() method can be called">
         <description>
           <pre_condition>Before Click run, remove the earphone from target. After Click run, make sure earphone is plugged in</pre_condition>