From: Witold Choinkowski Date: Thu, 26 Sep 2013 15:20:58 +0000 (+0200) Subject: [messaging_sms] method_returns_undefined X-Git-Tag: 2.2.1_release~105^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecd1f9eada281cad18c80082058aaf0bf1830344;p=test%2Ftct%2Fweb%2Fapi.git [messaging_sms] method_returns_undefined Change-Id: I7bde2515ed44354e4857657a4feb66068832d396 --- diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageService_sms_sendMessage_without_errorCallback.html b/tct-messaging-sms-tizen-tests/messaging/MessageService_sms_sendMessage_without_errorCallback.html index f582c4558..9ea48e177 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageService_sms_sendMessage_without_errorCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageService_sms_sendMessage_without_errorCallback.html @@ -39,7 +39,7 @@ setup({ timeout: 90000 }); var t = async_test("MessageService_sms_sendMessage_without_errorCallback", { timeout: 90000 }), message, datetime, - sendSuccess, returnedValue, + sendSuccess, returnedValue = null, service, serviceListSuccess, serviceListError; t.step(function () { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_findMessages_filter_sms_valid.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_findMessages_filter_sms_valid.html index db857b672..3dfb97281 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_findMessages_filter_sms_valid.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_findMessages_filter_sms_valid.html @@ -45,7 +45,7 @@ setup({timeout: 90000}); var t = async_test("MessageStorage_findMessages_filter_sms_valid", {timeout:90000}); t.step(function () { var smsService, findSuccess, findError, typeFilter, serviceSuccess, addSuccess, - addedMessage, foundMessage = 0, returnedValue, i, serviceError; + addedMessage, foundMessage = 0, returnedValue = null, i, serviceError; findSuccess = t.step_func(function (messages) { assert_greater_than(messages.length, 0, "Received empty messages array"); @@ -56,6 +56,7 @@ t.step(function () { } } assert_equals(foundMessage, 1, "Incorrect number of found messages"); + assert_equals(returnedValue, undefined, "Incorrect returned value"); t.done(); }); @@ -67,7 +68,6 @@ t.step(function () { addedMessage = message; typeFilter = new tizen.AttributeFilter("type", "EXACTLY", "messaging.sms"); returnedValue = smsService.messageStorage.findMessages(typeFilter, findSuccess, findError); - assert_equals(returnedValue, undefined, "Incorrect returned value"); }); serviceSuccess = t.step_func(function (services) { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage.html index 81048a289..4ed7bd99c 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage.html @@ -41,13 +41,14 @@ setup({timeout: 90000}); var t = async_test("MessageStorage_sms_addDraftMessage", {timeout:90000}); t.step(function () { var serviceSuccess, serviceError, messageService, messageStorage, message, - currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(), returnedValue, + currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(), returnedValue = null, addDraftSuccess, addDraftError, filter, findMessagesSuccess, findMessagesError; findMessagesSuccess = t.step_func(function (messages) { assert_equals(messages.length, 1, "Received incorrect number of messages"); assert_equals(messages[0].body.plainBody, plainBodyToSet, "plainBody attribute is incorrect."); + t.done(); }); @@ -56,6 +57,7 @@ t.step(function () { }); addDraftSuccess = t.step_func(function () { + assert_equals(returnedValue, undefined, "Incorrect returned value."); filter = new tizen.AttributeFilter("body.plainBody", "EXACTLY", plainBodyToSet); messageStorage.findMessages(filter, findMessagesSuccess, findMessagesError); }); @@ -70,8 +72,6 @@ t.step(function () { messageStorage = messageService.messageStorage; message = new tizen.Message("messaging.sms", {plainBody: plainBodyToSet, to: [TEST_SMS_RECIPIENT]}); returnedValue = messageStorage.addDraftMessage(message, addDraftSuccess, addDraftError); - assert_equals(returnedValue, undefined, "Incorrect returned value."); - }); serviceError = t.step_func(function (error) { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_errorCallback.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_errorCallback.html index bc0292f38..dbef37d9d 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_errorCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_errorCallback.html @@ -41,13 +41,15 @@ setup({timeout: 90000}); var t = async_test("MessageStorage_sms_addDraftMessage_without_errorCallback", {timeout:90000}); t.step(function () { var serviceSuccess, serviceError, messageService, messageStorage, message, - currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(), returnedValue, + currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(), returnedValue = null, addDraftSuccess, filter, findMessagesSuccess, findMessagesError; findMessagesSuccess = t.step_func(function (messages) { assert_equals(messages.length, 1, "Received incorrect number of messages"); assert_equals(messages[0].body.plainBody, plainBodyToSet, "plainBody attribute is incorrect."); + + assert_equals(returnedValue, undefined, "Incorrect returned value."); t.done(); }); @@ -66,8 +68,6 @@ t.step(function () { messageStorage = messageService.messageStorage; message = new tizen.Message("messaging.sms", {plainBody: plainBodyToSet, to: [TEST_SMS_RECIPIENT]}); returnedValue = messageStorage.addDraftMessage(message, addDraftSuccess); - assert_equals(returnedValue, undefined, "Incorrect returned value."); - }); serviceError = t.step_func(function (error) { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_successCallback.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_successCallback.html index 9ead3f237..4e8cf8b19 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_successCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_addDraftMessage_without_successCallback.html @@ -41,7 +41,7 @@ setup({timeout: 90000}); var t = async_test("MessageStorage_sms_addDraftMessage_without_successCallback", {timeout:90000}); t.step(function () { var serviceSuccess, serviceError, messageService, messageStorage, message, - returnedValue; + returnedValue = null; serviceSuccess = t.step_func(function (services) { assert_greater_than(services.length, 0, "Received empty services array"); diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations.html index da4934c00..7b098ad0b 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations.html @@ -47,12 +47,14 @@ var t = async_test("MessageStorage_sms_findConversations", {timeout: 90000}), serviceSuccess, serviceError, addSuccess, addError, conversationSuccess, conversationError, - service, newMessage, filter, returnedValue, removeAllSuccess; + service, newMessage, filter, returnedValue = null, removeAllSuccess; t.step(function () { conversationSuccess = t.step_func(function (conversations) { assert_type(conversations, "array", "conversations"); assert_greater_than(conversations.length, 0, "Received empty conversations array"); + + assert_equals(returnedValue, undefined, "findConversations should return undefined"); t.done(); }); @@ -64,7 +66,6 @@ t.step(function () { filter = new tizen.AttributeFilter("id", "EXACTLY", newMessage.conversationId); returnedValue = service.messageStorage.findConversations(filter, conversationSuccess, conversationError); - assert_equals(returnedValue, undefined, "findConversations should return undefined"); }); addError = t.step_func(function (error) { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_id.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_id.html index 5ce1f15f5..31ede7226 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_id.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_id.html @@ -44,7 +44,7 @@ Authors: setup({timeout: 90000}); var t = async_test("MessageStorage_sms_findConversations_filter_id", {timeout:90000}), - serviceSuccess, serviceError, returnedValue, + serviceSuccess, serviceError, returnedValue = null, addDraftSuccess, addDraftError, findMessageSuccess, findMessageError, conversationSuccess, conversationError, @@ -57,6 +57,7 @@ t.step(function () { assert_equals(conversations.length, 1, "should find exactly one conversation"); assert_equals(conversations[0].id, convId, "conversationId should match"); + assert_equals(returnedValue, undefined, "Incorrect returned value"); t.done(); }); @@ -71,7 +72,6 @@ t.step(function () { filter = new tizen.AttributeFilter( "id", "EXACTLY", convId); returnedValue = service.messageStorage.findConversations(filter, conversationSuccess, conversationError); - assert_equals(returnedValue, undefined, "Incorrect returned value"); }); findMessageError = t.step_func(function (error) { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_to.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_to.html index 102c608c3..f964698a5 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_to.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findConversations_filter_to.html @@ -45,7 +45,7 @@ setup({timeout: 90000}); var t = async_test("MessageStorage_sms_findConversations_filter_to", {timeout: 90000}); t.step(function () { - var serviceSuccess, serviceError, returnedValue, + var serviceSuccess, serviceError, returnedValue = null, sendSuccess, sendError, conversationSuccess, conversationError, service, newMessage, filter, @@ -56,6 +56,8 @@ t.step(function () { assert_greater_than(conversations.length, 0, "Received empty conversations array"); assert_not_equals(conversations[0].to[0].indexOf(TEST_SMS_RECIPIENT), -1, "conversation.to should contain the value we were looking for"); + + assert_equals(returnedValue, undefined, "Incorrect returned value"); t.done(); }); @@ -67,7 +69,6 @@ t.step(function () { filter = new tizen.AttributeFilter("to", "CONTAINS", recipient); returnedValue = service.messageStorage.findConversations(filter, conversationSuccess, conversationError); - assert_equals(returnedValue, undefined, "Incorrect returned value"); }); sendError = t.step_func(function (error) { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_from_with_errorCallback.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_from_with_errorCallback.html index 117d19bc9..ecc34bf19 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_from_with_errorCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_from_with_errorCallback.html @@ -39,7 +39,7 @@ Authors: setup({timeout: 90000}); var t = async_test("MessageStorage_sms_findMessages_from_with_errorCallback", {timeout: 90000}), - serviceSuccess, serviceError, service, returnedValue, filter, findSuccessCB, findErrorCB, + serviceSuccess, serviceError, service, returnedValue = null, filter, findSuccessCB, findErrorCB, fromFound, i; t.step(function () { diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_with_sort.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_with_sort.html index 5aeed119f..bdedfd2ef 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_with_sort.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_findMessages_with_sort.html @@ -43,7 +43,7 @@ t.step(function () { var getMessageServicesErrorCB, getMessageServicesSuccessCB, messageService, messageStorage, message, message_one, count = 0, addDraftSuccessCB, addDraftErrorCB, filter, sortMode, findSuccessCB, findErrorCB, i, loadMessageSuccess, loadMessageError, - findCounter = 0, loadCounter = 0, returnedValue; + findCounter = 0, loadCounter = 0, returnedValue = null; loadMessageSuccess = t.step_func(function (msg) { loadCounter++; @@ -61,6 +61,8 @@ t.step(function () { }); findSuccessCB = t.step_func(function (msg) { + assert_equals(returnedValue, undefined, "Incorrect returned value"); + assert_greater_than(msg.length, 1, "Received empty msg array"); findCounter = msg.length; @@ -83,7 +85,6 @@ t.step(function () { filter = new tizen.AttributeFilter("body.plainBody", "CONTAINS", message.body.plainBody); sortMode = new tizen.SortMode("id", "ASC"); returnedValue = messageStorage.findMessages(filter, findSuccessCB, findErrorCB, sortMode); - assert_equals(returnedValue, undefined, "Incorrect returned value"); } }); diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages.html index 35d892abe..c7e9e4432 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages.html @@ -46,7 +46,7 @@ t.step(function () { initDictForMutableMessage = smsMessageInitDict, initDictForConstMessage = smsMessageInitDict, plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const", - addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue, + addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null, updateSuccess, updateError, mutableMessagefilter, constMessagefilter, findMutableMessagesSuccess, findMutableMessagesError, foundMutableMessage, mutable = "MUTABLE", findConstMessagesSuccess, findConstMessagesError, foundConstMessage, consts = "CONST", diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_errorCallback.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_errorCallback.html index e31fb0aad..7e7f87ced 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_errorCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_errorCallback.html @@ -46,7 +46,7 @@ t.step(function () { initDictForMutableMessage = smsMessageInitDict, initDictForConstMessage = smsMessageInitDict, plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const", - addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue, + addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null, updateSuccess, mutableMessagefilter, constMessagefilter, findMutableMessagesSuccess, findMutableMessagesError, foundMutableMessage, mutable = "MUTABLE", findConstMessagesSuccess, findConstMessagesError, foundConstMessage, consts = "CONST", diff --git a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_successCallback.html b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_successCallback.html index ac4901102..73a3aa2c8 100644 --- a/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_successCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/MessageStorage_sms_updateMessages_without_successCallback.html @@ -46,7 +46,7 @@ t.step(function () { initDictForMutableMessage = smsMessageInitDict, initDictForConstMessage = smsMessageInitDict, plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const", - addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue; + addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null; addDraftSuccess = t.step_func(function () { addDraftSuccessCounter++; diff --git a/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices.html b/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices.html index b4e3e3e6f..a72294f20 100644 --- a/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices.html +++ b/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices.html @@ -40,7 +40,7 @@ setup({timeout: 90000}); var t = async_test("Messaging_sms_getMessageServices", {timeout: 90000}); t.step(function () { - var serviceSuccess, i, returnedValue; + var serviceSuccess, i, returnedValue = null; serviceSuccess = t.step_func(function (services) { assert_equals(returnedValue, undefined, "Incorrect returned value."); diff --git a/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices_with_errorCallback.html b/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices_with_errorCallback.html index 3a26f53a7..12f29e9d5 100644 --- a/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices_with_errorCallback.html +++ b/tct-messaging-sms-tizen-tests/messaging/Messaging_sms_getMessageServices_with_errorCallback.html @@ -40,7 +40,7 @@ setup({timeout: 90000}); var t = async_test("Messaging_sms_getMessageServices_with_errorCallback", {timeout: 90000}); t.step(function () { - var serviceSuccess, serviceError, i, returnedValue; + var serviceSuccess, serviceError, i, returnedValue = null; serviceSuccess = t.step_func(function (services) { assert_equals(returnedValue, undefined, "Incorrect returned value.");