[Common][MediaController] Fix for TCT test checking undocumented behavior. 09/192009/6
authorMichal Michalski <m.michalski2@partner.samsung.com>
Fri, 26 Oct 2018 13:05:39 +0000 (15:05 +0200)
committerMichal Michalski <m.michalski2@partner.samsung.com>
Tue, 30 Oct 2018 13:21:33 +0000 (14:21 +0100)
Function removeDeviceStateChangeListener was throwing exception if listener id was not registered. This was undocumented behavior and will be removed in separate commit. Test changed to pass when exception is not thrown.

[Verification] TCT tests which call changed api functions passed.

Change-Id: Ie71f12d6c429f9094c482630f952276837acaaef
Signed-off-by: Michal Michalski <m.michalski2@partner.samsung.com>
common/tct-sound-tizen-tests/sound/SoundManager_removeDeviceStateChangeListener.html

index 2d844a35818a885bcb3d00ed498c00a724fbdeeb..3174dec5427980eae91a21b7e1e03bd7d4fb2880 100755 (executable)
@@ -45,14 +45,10 @@ t.step(function () {
     changeCallback = t.step_func(function (info) {
         retValue = tizen.sound.removeDeviceStateChangeListener(listenerId);
         assert_equals(retValue, undefined, "removeDeviceStateChangeListener returns wrong value");
-        assert_throws(INVALID_VALUES_EXCEPTION, function () {
-            tizen.sound.removeDeviceStateChangeListener(listenerId);
-        }, "Method should throw an exception caused by removing nonexist listener.");
         t.done();
     });
 
     listenerId = tizen.sound.addDeviceStateChangeListener(changeCallback);
-
 });
 
 </script>