[Messaging] - Testing an argument type of the function stopSync
authorAndrzej Popowski <a.popowski@samsung.com>
Wed, 28 Jan 2015 11:25:58 +0000 (12:25 +0100)
committerAndrzej Popowski <a.popowski@samsung.com>
Wed, 28 Jan 2015 11:25:58 +0000 (12:25 +0100)
Change-Id: I1151e78ffac7af8b67daf84a4e788743828bbc0c
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/messaging/messaging_api.js

index d4bfbfca86d73679046c38b9a0b3b2d4b63b22f7..c57b69c4a4963bfedec93609ef2280ad0a6641c7 100644 (file)
@@ -922,6 +922,11 @@ MessageService.prototype.stopSync = function () {
         {name: 'opId', type: types_.LONG}
     ]);
 
+    // Additionally to pass the MessageService_email_stopSync_opId_TypeMismatch test
+    if (!isFinite(arguments[0])) {
+        throw new tizen.WebAPIException(tizen.WebAPIException.TYPE_MISMATCH_ERR);
+    }
+
     var self = this;
     bridge.sync({
         cmd: 'MessageService_stopSync',