//==== TEST_CRITERIA MR MAST MOA
setup({timeout: 90000});
-var t = async_test("MessageStorage_mms_updateMessages", {timeout:90000});
+var t = async_test("MessageStorage_mms_updateMessages", {timeout: 90000}),
+ serviceSuccess, serviceError, messageService, messageStorage,
+ currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(),
+ mutableMessage, constMessage,
+ initDictForMutableMessage = mmsMessageInitDict, initDictForConstMessage = mmsMessageInitDict,
+ plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const",
+ addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null,
+ updateSuccess, updateError, mutableMessagefilter, constMessagefilter,
+ findMutableMessagesSuccess, findMutableMessagesError, foundMutableMessage, mutable = "MUTABLE",
+ findConstMessagesSuccess, findConstMessagesError, foundConstMessage, consts = "CONST",
+ loadMutableSuccess, loadMutableError,
+ loadConstSuccess, loadConstError,
+ testMessage, testAttachment, testAttachmentCounter = 0;
t.step(function () {
- var serviceSuccess, serviceError, messageService, messageStorage,
- currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(),
- mutableMessage, constMessage,
- initDictForMutableMessage = mmsMessageInitDict, initDictForConstMessage = mmsMessageInitDict,
- plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const",
-
- addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null,
- updateSuccess, updateError, mutableMessagefilter, constMessagefilter,
- findMutableMessagesSuccess, findMutableMessagesError, foundMutableMessage, mutable = "MUTABLE",
- findConstMessagesSuccess, findConstMessagesError, foundConstMessage, consts = "CONST",
- loadMutableSuccess, loadMutableError,
- loadConstSuccess, loadConstError,
- loadMutableAttachmentSuccess, loadMutableAttachmentError,
- loadConstAttachmentSuccess, loadConstAttachmentError,
- testMessage, testAttachment, testAttachmentCounter = 0;
testAttachment = t.step_func(function (attachment, type) {
var j, foundAttachmenentCounter = 0;
}
});
- loadMutableAttachmentSuccess = t.step_func(function (attachment) {
- testAttachment(attachment, mutable);
- });
-
- loadMutableAttachmentError = t.step_func(function (error) {
- assert_unreached("loadMessageAttachment() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
- loadConstAttachmentSuccess = t.step_func(function (attachment) {
- testAttachment(attachment, consts);
- });
-
- loadConstAttachmentError = t.step_func(function (error) {
- assert_unreached("loadMessageAttachment() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
testMessage = t.step_func(function (messageToTest, originalMessage, type) {
var i;
assert_equals(messageToTest.id, originalMessage.id, type + " id attribute.");
assert_equals(messageToTest.attachments.length, originalMessage.attachments.length, type + " incorrect length of attachments");
for (i = 0; i < messageToTest.attachments.length; i++) {
if (type === mutable) {
- messageService.loadMessageAttachment(messageToTest.attachments[i], loadMutableAttachmentSuccess, loadMutableAttachmentError);
+ testAttachment(messageToTest.attachments[i], mutable);
} else if (type === consts) {
- messageService.loadMessageAttachment(messageToTest.attachments[i], loadConstAttachmentSuccess, loadConstAttachmentError);
+ testAttachment(messageToTest.attachments[i], consts);
} else {
assert_unreached("FIX your test - unknown type = " + type);
}
serviceError = t.step_func(function (error) {
assert_unreached("getMessageServices() error callback: name:" + error.name + ", msg:" + error.message);
});
+
tizen.messaging.getMessageServices("messaging.mms", serviceSuccess, serviceError);
});
//==== TEST_CRITERIA MR MOA MAST
setup({timeout: 90000});
-var t = async_test("MessageStorage_mms_updateMessages_without_errorCallback", {timeout:90000});
+var t = async_test("MessageStorage_mms_updateMessages_without_errorCallback", {timeout: 90000}),
+ serviceSuccess, serviceError, messageService, messageStorage,
+ currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(),
+ mutableMessage, constMessage,
+ initDictForMutableMessage = mmsMessageInitDict, initDictForConstMessage = mmsMessageInitDict,
+ plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const",
+ addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null,
+ updateSuccess, mutableMessagefilter, constMessagefilter,
+ findMutableMessagesSuccess, findMutableMessagesError, foundMutableMessage, mutable = "MUTABLE",
+ findConstMessagesSuccess, findConstMessagesError, foundConstMessage, consts = "CONST",
+ loadMutableSuccess, loadMutableError,
+ loadConstSuccess, loadConstError,
+ testMessage, testAttachment, testAttachmentCounter = 0;
t.step(function () {
- var serviceSuccess, serviceError, messageService, messageStorage,
- currentDate = new Date(), plainBodyToSet = currentDate.getTime().toString(),
- mutableMessage, constMessage,
- initDictForMutableMessage = mmsMessageInitDict, initDictForConstMessage = mmsMessageInitDict,
- plainBodyToSetForMutableMessage = plainBodyToSet + "_mutable", plainBodyToSetForConstMessage = plainBodyToSet + "_const",
-
- addDraftSuccess, addDraftError, addDraftSuccessCounter = 0, returnedValue = null,
- updateSuccess, mutableMessagefilter, constMessagefilter,
- findMutableMessagesSuccess, findMutableMessagesError, foundMutableMessage, mutable = "MUTABLE",
- findConstMessagesSuccess, findConstMessagesError, foundConstMessage, consts = "CONST",
- loadMutableSuccess, loadMutableError,
- loadConstSuccess, loadConstError,
- loadMutableAttachmentSuccess, loadMutableAttachmentError,
- loadConstAttachmentSuccess, loadConstAttachmentError,
- testMessage, testAttachment, testAttachmentCounter = 0;
testAttachment = t.step_func(function (attachment, type) {
var j, foundAttachmenentCounter = 0;
}
});
- loadMutableAttachmentSuccess = t.step_func(function (attachment) {
- testAttachment(attachment, mutable);
- });
-
- loadMutableAttachmentError = t.step_func(function (error) {
- assert_unreached("loadMessageAttachment() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
- loadConstAttachmentSuccess = t.step_func(function (attachment) {
- testAttachment(attachment, consts);
- });
-
- loadConstAttachmentError = t.step_func(function (error) {
- assert_unreached("loadMessageAttachment() error callback: name:" + error.name + ", msg:" + error.message);
- });
-
testMessage = t.step_func(function (messageToTest, originalMessage, type) {
var i;
assert_equals(messageToTest.id, originalMessage.id, type + " id attribute.");
assert_equals(messageToTest.attachments.length, originalMessage.attachments.length, type + " incorrect length of attachments");
for (i = 0; i < messageToTest.attachments.length; i++) {
if (type === mutable) {
- messageService.loadMessageAttachment(messageToTest.attachments[i], loadMutableAttachmentSuccess, loadMutableAttachmentError);
+ testAttachment(messageToTest.attachments[i], mutable);
} else if (type === consts) {
- messageService.loadMessageAttachment(messageToTest.attachments[i], loadConstAttachmentSuccess, loadConstAttachmentError);
+ testAttachment(messageToTest.attachments[i], consts);
} else {
assert_unreached("FIX your test - unknown type = " + type);
}