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>
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>