[common][mediacontroller][improve 4 tc to avoid block issue] 28/222028/1
authorzhongyuan <zy123.yuan@samsung.com>
Thu, 9 Jan 2020 06:58:14 +0000 (14:58 +0800)
committerzhongyuan <zy123.yuan@samsung.com>
Thu, 9 Jan 2020 06:58:14 +0000 (14:58 +0800)
Change-Id: I825b7257da70909fd387b135fe8a3fa170ea76a7

common/tct-mediacontroller-tizen-tests/mediacontroller/MediaControllerPlaybackInfoChangeCallback_onmetadatachanged.html
common/tct-mediacontroller-tizen-tests/mediacontroller/MediaControllerPlaybackInfoChangeCallback_onplaybackchanged.html
common/tct-mediacontroller-tizen-tests/mediacontroller/MediaControllerPlaybackInfoChangeCallback_onrepeatstatechanged.html
common/tct-mediacontroller-tizen-tests/mediacontroller/MediaControllerPlaybackInfoChangeCallback_onshufflemodechanged.html

index f78c0cdf72300a168ffacc88ad8abbb6b0adc8a6..4b65b2181109fa65b05124279b7a977263f53c70 100755 (executable)
@@ -40,11 +40,13 @@ setup({timeout: 30000});
 var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId, beforedata;
 
 t.step(function () {
+    add_result_callback(function(){
+        mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+    });
     playbackListener =  {
         onmetadatachanged: t.step_func(function(metadata) {
             assert_type(metadata, "object", "metadata should be an object");
             assert_equals(JSON.stringify(metadata), JSON.stringify(beforedata), "metadata should be updated");
-            mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
             t.done();
         })
     };
index f3d884c1204169eba952ae52b326c713d6680316..f46756f182618a66e16fc391f7c9b43b2595b09a 100755 (executable)
@@ -40,12 +40,14 @@ setup({timeout: 30000});
 var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId;
 
 t.step(function () {
+    add_result_callback(function(){
+        mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+    });
     playbackListener =  {
         onplaybackchanged: t.step_func(function(state, position) {
             assert_type(state, "string", "state should be a string");
             assert_equals(state, "STOP", "state should be PLAY");
             assert_type(position, "long", "position should be a long");
-            mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
             t.done();
         })
     };
index b907dc4897073e08a695a6a419f7486bb1cdaa84..1305219afee68cca9961effb8f9e0f519205064e 100755 (executable)
@@ -40,11 +40,13 @@ setup({timeout: 30000});
 var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId = null;
 
 t.step(function () {
+    add_result_callback(function(){
+        mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+    });
     playbackListener =  {
         onrepeatstatechanged: t.step_func(function(state) {
             assert_type(state, "string", "state should be a string");
             assert_equals(state, "REPEAT_ALL", "state should be updated");
-            mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
             t.done();
         })
     };
index bf86ac959439f4889dbb7f314c7459b68f047bda..27cd41910ab385dcfbebc8cd60709037fdc10681 100755 (executable)
@@ -40,11 +40,13 @@ setup({timeout: 30000});
 var t = async_test(document.title, {timeout: 30000}), mcServer, mcClient, mcServerInfo, playbackListener, watcherId, beforemode;
 
 t.step(function () {
+    add_result_callback(function(){
+        mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
+    });
     playbackListener =  {
         onshufflemodechanged: t.step_func(function(mode) {
             assert_type(mode, "boolean", "mode should be a boolean");
             assert_equals(mode, !beforemode, "mode should be updated");
-            mcServerInfo.playback.removePlaybackInfoChangeListener(watcherId);
             t.done();
         })
     };