[Verification] Code compiles without errors.
Below tests pass:
MediaControllerServerInfo_removeServerStatusChangeListener_watchId_invalid
:MediaControllerServerInfo_removePlaybackInfoChangeListener_watchId_invalid
Change-Id: I74646150669cc5d8e95893e7bd605ca885cd5568
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
};
ListenerManager.prototype.removeListener = function(watchId) {
+ if (this.listeners[watchId] === null || this.listeners[watchId] === undefined) {
+ throw new WebAPIException(0, 'Watch id not found.', 'InvalidValuesError');
+ }
+
if (this.listeners.hasOwnProperty(watchId)) {
delete this.listeners[watchId];
}