[Messaging-mms] removed invocation of loadMessageAttachament method
authorAndrzej Krolikowski <a.krolikowsk@samsung.com>
Tue, 1 Oct 2013 12:32:04 +0000 (14:32 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Wed, 2 Oct 2013 13:22:52 +0000 (13:22 +0000)
Change-Id: Ia81eaa237e6453b11f0d32e0085885025fca3859

tct-messaging-mms-tizen-tests/messaging/MessageStorage_mms_updateMessages.html
tct-messaging-mms-tizen-tests/messaging/MessageStorage_mms_updateMessages_without_errorCallback.html

index f3ceb8c17e85922fba4ec2de2f18d5827072a574..ec4d33806a1ad5db8cd2375d15a04f2cd7ba3d2c 100644 (file)
@@ -38,23 +38,20 @@ Authors:
 //==== 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;
@@ -94,22 +91,6 @@ t.step(function () {
         }
     });
 
-    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.");
@@ -138,9 +119,9 @@ t.step(function () {
         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);
             }
@@ -244,6 +225,7 @@ t.step(function () {
     serviceError = t.step_func(function (error) {
         assert_unreached("getMessageServices() error callback: name:" + error.name + ", msg:" + error.message);
     });
+
     tizen.messaging.getMessageServices("messaging.mms", serviceSuccess, serviceError);
 });
 
index f836162a778f2a4b07ac3195682d9e9c45aadd8d..0b6a102764fe8d8bba1a773dcf419e3f84fa3413 100644 (file)
@@ -38,23 +38,20 @@ Authors:
 //==== 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;
@@ -94,22 +91,6 @@ t.step(function () {
         }
     });
 
-    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.");
@@ -138,9 +119,9 @@ t.step(function () {
         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);
             }