[tizen-tests] improved returned value check of async methods
authorPiotr Szydelko <p.szydelko@samsung.com>
Thu, 26 Sep 2013 14:01:20 +0000 (16:01 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 30 Sep 2013 09:27:25 +0000 (09:27 +0000)
Change-Id: I4a555a5d44fc12c3232d6338d122c8da32dd9fa4

40 files changed:
tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_oninstalled.html
tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onuninstalled.html
tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onupdated.html
tct-application-tizen-tests/application/ApplicationManager_launch.html
tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_errorCallback.html
tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_successCallback.html
tct-calendar-tizen-tests/calendar/Calendar_updateBatch.html
tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener.html
tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener_onadded.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null_filter.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null_sortMode.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_limit_null_offset.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_0.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_1.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_nullableArgs_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_0.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode_null.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_errorCallback.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_filter.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_limit.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_offset.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_sortMode.html
tct-callhistory-tizen-tests/callhistory/CallHistory_find_without_errorCallback.html
tct-contact-tizen-tests/contact/AddressBook_addBatch_with_successCallback.html
tct-contact-tizen-tests/contact/AddressBook_removeBatch_errorCallback_invoked.html
tct-contact-tizen-tests/contact/AddressBook_updateBatch.html
tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_errorCallback.html
tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_successCallback.html
tct-contact-tizen-tests/contact/ContactManager_updateBatch_with_errorCallback.html
tct-content-tizen-tests/content/ContentManager_find.html
tct-datasync-tizen-tests/datasync/DataSynchronizationManager_startSync_with_callback.html

index edfd3930bde5da20a545b7af90c6124522b2936b..f7300ec85a71d83ad14d20bc436031d7f2e532bd 100644 (file)
@@ -67,7 +67,7 @@ this_test.step(function () {
     };
 
     watchId = tizen.application.addAppInfoEventListener(appEventCallback);
-    assert_type(watchId, "number", "wrong listener ID");
+    assert_type(watchId, "long", "wrong listener ID");
 });
 
 </script>
index 3a679e637e7b5ce667dc03923992f3c726e4415f..cb75cf45d1d7e53498bfb1385047407587650658 100644 (file)
@@ -67,7 +67,7 @@ this_test.step(function () {
     };
 
     watchId = tizen.application.addAppInfoEventListener(appEventCallback);
-    assert_type(watchId, "number", "wrong listener ID");
+    assert_type(watchId, "long", "wrong listener ID");
 });
 
 </script>
index 6edcc0a839930711582189fb2df1065ac032837e..a05ac6c128782119d810620d77ec04b726a72a18 100644 (file)
@@ -67,7 +67,7 @@ this_test.step(function () {
     };
 
     watchId = tizen.application.addAppInfoEventListener(appEventCallback);
-    assert_type(watchId, "number", "wrong listener ID");
+    assert_type(watchId, "long", "wrong listener ID");
 
 });
 
index 2a22fec0c95e559783f63a65f85428931a337f55..bc17be8319c942d827007cebf02ffb551f1bf30d 100644 (file)
@@ -46,7 +46,7 @@ Authors:
 //==== TEST_CRITERIA MMINA MAST MR
 setup({timeout: 30000});
 
-var t = async_test("ApplicationManager_launch", { timeout : 30000 }), retVal;
+var t = async_test("ApplicationManager_launch", { timeout : 30000 }), retVal = null;
 
 setup_launch(t, TCT_APPCONTROL_APPID, function () {
     retVal = tizen.application.launch(TCT_APPCONTROL_APPID);
index defbc04c4dd8cd7ea91603cda8468e2bff50704b..ad46b61a337973b918bb78ddf4aec11da8af8186 100644 (file)
@@ -41,7 +41,7 @@ Authors:
 var t = async_test("Calendar_addBatch_with_errorCallback", {timeout: 5000});
 
 t.step(function () {
-    var events, eventCalendar, returnedValue, onAddBatchErrorCB, onAddBatchSuccessCB;
+    var events, eventCalendar, returnedValue = null, onAddBatchErrorCB, onAddBatchSuccessCB;
 
     eventCalendar = tizen.calendar.getDefaultCalendar("EVENT");
     events = createTestEvents();
index 0bd0070fd1deda4c23dee85b5cc8c1f03a530d9b..35341f0c60f0ba39267b8be5863a232d4856e4a2 100644 (file)
@@ -41,7 +41,7 @@ Authors:
 var t = async_test("Calendar_addBatch_with_successCallback", {timeout: 5000});
 
 t.step(function () {
-    var events, eventCalendar, onAddBatchSuccessCB, returnedValue;
+    var events, eventCalendar, onAddBatchSuccessCB, returnedValue = null;
 
     eventCalendar = tizen.calendar.getDefaultCalendar("EVENT");
     events = createTestEvents();
index 86501f3f5a9861eb3ebff8f0e957c8b1253cbc88..89dd6ec837c374fa1d557ea25ed095823462513a 100644 (file)
@@ -34,7 +34,6 @@ Authors:
 //==== SPEC Tizen Web API:Social:Calendar:Calendar:updateBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
 //==== TEST_CRITERIA MOA MAST MR
-//  check whether 
 var t = async_test("Calendar_updateBatch"), addBatchSuccessCB, addBatchErrorCB,
     events = [], beforeValues = [], expected = [], returnedValue = null,
     calendar, updateBatchErrorCB, findSuccessCB, findErrorCB;
@@ -70,12 +69,12 @@ t.step(function (){
         events[1].description = Math.random().toFixed(5);
         expected[events[1].id.uid] = events[1].description;
 
-        returnedValue = calendar.updateBatch(events, function () {
+        returnedValue = calendar.updateBatch(events, t.step_func(function () {
             var filter1 = new tizen.AttributeFilter("id.uid", "EXACTLY", events[0].id.uid),
                 filter2 = new tizen.AttributeFilter("id.uid", "EXACTLY", events[1].id.uid),
                 filter = new tizen.CompositeFilter("UNION", [filter1, filter2]);
             calendar.find(findSuccessCB, findErrorCB, filter);
-        }, updateBatchErrorCB);
+        }), updateBatchErrorCB);
     });
     addBatchErrorCB = t.step_func(function (error) {
         assert_unreached("addBatch() error callaback invoked: " + error.name + ": " + error.message);
index 3fea94fff2e8342826111580a84ed59260243e17..b4f96132723691486dc1b5388b274cab99bf6673 100644 (file)
@@ -57,7 +57,7 @@ test(function () {
 
     try {
         handle = tizen.callhistory.addChangeListener(listener);
-        assert_type(handle, "number", "handle should be a number");
+        assert_type(handle, "long", "handle should be a number");
     } finally {
         tizen.callhistory.removeChangeListener(handle);
     }
index 2f5376dc6936da512e1574de6ecceef3bcdd8119..89f6b93834f4809f76bb885c0267b03d21d83900 100644 (file)
@@ -42,7 +42,7 @@ test(function () {
 
     handle = tizen.callhistory.addChangeListener(listener);
     try {
-        assert_type(handle, "number", "handle should be a number");
+        assert_type(handle, "long", "handle should be a number");
     } finally {
         tizen.callhistory.removeChangeListener(handle);
     }
index 627f44a4aaa163458c8ec922fc3447071bef85db..b449f866de46ebc468a7fd538306c1511563e4ea 100644 (file)
@@ -39,16 +39,16 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_errorCallback_null", { timeout: 90000 }),
-    findSuccess, returnedValue;
+    findSuccess, returnedValue = null;
 
 t.step(function () {
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, null);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 89f480f52634fc7175aa83142eda7962c34068e8..8075e4881a63b107e095c19e6b9a1dec44a1603e 100644 (file)
@@ -38,15 +38,15 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_errorCallback_null_filter", { timeout: 90000 }),
-    findSuccess, returnedValue;
+    findSuccess, returnedValue = null;
 
 t.step(function () {
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
     returnedValue = tizen.callhistory.find(findSuccess, null, FILTER_TYPE_1);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index e6e16a7e925ff79d560f6baeef54ae4db8f9a992..829d7a150a362201bb6106d43199deeced141073 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_filter", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, FILTER_TYPE_1);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 6dbef2bcfd62bdb5891a4ef06d802212b8028fae..7e95518e24d6b7f8e92489b0a82ed2720f09463e 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_filter_null", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index b42529c255d87498b471c8b8e329871d33794ac2..f83902b2ce6ede41f2c8fa07e720a9ae7854151b 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_filter_null_sortMode", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, SORT_MODE);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index cdee2d9f08f8a99292ca1069311d1a26a054c494..3eb31703a81505b425564c38bbf9361af0bef36f 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_filter_sortMode_limit_null_offset", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null, null, OFFSET);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 92fb851dbb3b52e96fd6f586967a6ecca2598d49..f9cb8e043150af1e91b19664868268d5021c8343 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_filter_sortMode_null", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null, LIMIT);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index a9e3bd6bf8999c0f39529df37728bf5a8bfc7c28..85dd9a51f7c73c6502713df54ac5e69c81b5d5af 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_limit", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, FILTER_TYPE_1, SORT_MODE, LIMIT);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 9b94bcdbb8051ce87699aaf7d8e492cba93d780d..7bb02711fd487d803adc5956da47efe03e748d21 100644 (file)
@@ -51,12 +51,13 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_limit_0", { timeout: 90000 }),
-    findSuccess, findError, findAfterSuccess, findAfterError, len, returnedValue;
+    findSuccess, findError, findAfterSuccess, findAfterError, len, returnedValue = null;
 
 t.step(function() {
     findAfterSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
         assert_equals(results.length, len, "expect no limit the query result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
@@ -67,7 +68,6 @@ t.step(function() {
     findSuccess = t.step_func(function (results) {
         len = results.length;
         returnedValue = tizen.callhistory.find(findAfterSuccess, findAfterError, null, null, 0);
-        assert_equals(returnedValue, undefined, "Incorrect returned value");
     });
 
     findError = t.step_func(function (error) {
index 2d0e4ceefdc68d3aec9eb509abf42d74d0b02de9..0e513f3a37d49264ddc59077d90aa4a48ae9c650 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_limit_1", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -48,11 +48,11 @@ t.step(function () {
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
         assert_less_than_equal(results.length, 1, "Length of result is greater than limit");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, FILTER_TYPE_1, SORT_MODE, 1);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 5b81f6a89306595cce0a44e1da8586ca947abcb7..66a984ac6abab18d0c4f2872e0e68a4a2e729f21 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_limit_null", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null, null);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 46f859aff50d2698dafb56eb8e371fd445a8d24d..1d07dcfdf7b7fe2c47c34533b2df1ba9061a5d76 100644 (file)
@@ -53,16 +53,16 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_nullableArgs_null", { timeout: 90000 }),
-    findSuccess, returnedValue;
+    findSuccess, returnedValue = null;
 
 t.step(function () {
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, null, null, null, null, null);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 1d38517b75124863bde6cd01c88951bd61e421d5..e47950449f7237f6d21563fcec82ee1ffaed0f76 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_offset", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, FILTER_TYPE_1, SORT_MODE, LIMIT, OFFSET);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 94523e3fdfa3056310395642205cce6bf9c7ac16..3554c91f0911b122d748cae888c8fe297f1068ac 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_offset_0", { timeout: 90000 }),
-    findError, findSuccess, lowerOffset = 0, returnedValue;
+    findError, findSuccess, lowerOffset = 0, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, FILTER_TYPE_1, SORT_MODE, LIMIT, lowerOffset);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index beb58746201cbd3c4363ec037b20f798598e2fe1..34f560e00c807fe41c4eea7773b2834946ce353a 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_offset_null", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null, null, null);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 549e55df9e4659aee582bedc11dfaca51e3427d4..a52e160d3dba1fa4c0c9fe1d68155b3ec117cf4d 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_sortMode", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, FILTER_TYPE_1, SORT_MODE);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 4123bc6f9805a3d47411d9de9cb95982356081b8..398372a345efc38fb8008f84c7ca6c38e64d9904 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_sortMode_null", { timeout: 90000 }),
-    findError, findSuccess, returnedValue;
+    findError, findSuccess, returnedValue = null;
 
 t.step(function () {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function () {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 9302c8b0d009d68380b91177528d8bd4d506e5bd..4397cd04b96b4879f7ca95e1b8e5233dc77edad7 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_with_errorCallback", { timeout: 90000 }),
-    findSuccess, findError, returnedValue;
+    findSuccess, findError, returnedValue = null;
 
 t.step(function() {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function() {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index bb97075f060a41a337f9bc4d6e328813deda5683..a3ccd0173309ec8bd5c7d1cf2b2307811dd6ca07 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 //==== TEST_CRITERIA MOA MR
 setup({timeout: 90000});
 
-var t = async_test("CallHistory_find_with_filter", { timeout: 90000 }), returnedValue,
+var t = async_test("CallHistory_find_with_filter", { timeout: 90000 }), returnedValue = null,
     findSuccess, findError, filter = new tizen.AttributeFilter("type", "EXACTLY", "TEL");
 
 t.step(function() {
@@ -48,11 +48,11 @@ t.step(function() {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, filter);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 3cd4bc895a862d75a670ae7ffcf719817db5a62a..c532da67f106186f3f4370a138c295a98daf5ac8 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_with_limit", { timeout: 90000 }),
-    findSuccess, findError, returnedValue;
+    findSuccess, findError, returnedValue = null;
 
 t.step(function() {
     findError = t.step_func(function (error) {
@@ -47,11 +47,11 @@ t.step(function() {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null, 1);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index c675204cb026ae1788b52a609c709823f323c0bb..370533b5c870c8b6b68fecd74cf81c190598aa45 100644 (file)
@@ -39,7 +39,7 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_with_offset", { timeout: 90000 }),
-    findSuccess, findError, returnedValue;
+    findSuccess, findError, returnedValue = null;
 
 t.step(function() {
     findError = t.step_func(function (error) {
@@ -48,11 +48,11 @@ t.step(function() {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, null, 1, 1);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 873ec8b597d0d8a7c791eedad06c45db63498c0e..a161b169bb8a1e86e3f9c1de9520c6948e9c96a8 100644 (file)
@@ -37,7 +37,7 @@ Authors:
 //==== TEST_CRITERIA MOA MR
 setup({timeout: 90000});
 
-var t = async_test("CallHistory_find_with_sortMode", { timeout: 90000 }), returnedValue,
+var t = async_test("CallHistory_find_with_sortMode", { timeout: 90000 }), returnedValue = null,
     findSuccess, findError, sortMode = new tizen.SortMode("startTime", "DESC");
 
 t.step(function() {
@@ -47,11 +47,11 @@ t.step(function() {
 
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess, findError, null, sortMode);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index 89e1fef76159abcbb5d9df604d6d2d9a69e621db..a922ead85f40a97d3a3d9a4021e2d7c353f37292 100644 (file)
@@ -38,16 +38,16 @@ Authors:
 setup({timeout: 90000});
 
 var t = async_test("CallHistory_find_without_errorCallback", { timeout: 90000 }),
-    findSuccess, returnedValue;
+    findSuccess, returnedValue = null;
 
 t.step(function() {
     findSuccess = t.step_func(function (results) {
         assert_type(results, "array", "Checking type of result");
+        assert_equals(returnedValue, undefined, "Incorrect returned value");
         t.done();
     });
 
     returnedValue = tizen.callhistory.find(findSuccess);
-    assert_equals(returnedValue, undefined, "Incorrect returned value");
 });
 </script>
 </body>
index e8dd25fe57f9184e51c4288a8dd2d7f42c4f1b94..79538f3b8540bc7df4d103710aec60c950e267f4 100644 (file)
@@ -39,7 +39,7 @@ Authors:
 //==== PRIORITY P2
 //==== SPEC Tizen Web API:Social:Contact:AddressBook:addBatch M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/contact.html
-//==== TEST_CRITERIA MOA
+//==== TEST_CRITERIA MOA MR
 var t = async_test("AddressBook_addBatch_with_successCallback"), contact_1, contact_2,
     addressbook, addBatchSuccess, returnedValue = null;
 t.step(function () {
index 25ec19658925169248b9b9ada2afdefa1d2cf64e..6105fb6a7a93805732e0bea1477617233b704044 100644 (file)
@@ -37,7 +37,7 @@ Authors:
 
 var t = async_test("AddressBook_removeBatch_errorCallback_invoked");
 t.step(function () {
-    var contact_1, contact_2, addressbook, removeBatchError, removeBatchSuccess, returnedValue;
+    var contact_1, contact_2, addressbook, removeBatchError, removeBatchSuccess, returnedValue = null;
     addressbook = tizen.contact.getDefaultAddressBook();
     contact_1 = new tizen.Contact({
         name: new tizen.ContactName({
@@ -61,13 +61,13 @@ t.step(function () {
         assert_unreached("removeBatch() success callback should not be invoked.");
     });
     removeBatchError = t.step_func(function (error) {
+        assert_equals(returnedValue, undefined, "Incorrect value returned.");
         t.done();
     });
     addressbook.add(contact_1);
     addressbook.add(contact_2);
 
     returnedValue = addressbook.removeBatch([-1], removeBatchSuccess, removeBatchError);
-    assert_equals(returnedValue, undefined, "Incorrect value returned.");
 });
 
 </script>
index fb40dd743373e7a86df2e8ba910a6243246d9346..d05569fe20a9d9977746f74f5fa5ab84bffd1581 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 var t = async_test("AddressBook_updateBatch");
 t.step(function () {
     var contact_1, contact_2, addressbook, updateBatchError, updateBatchSuccess, getContact_1,
-        getContact_2, getContact_3, getContact_4, returnedValue;
+        getContact_2, getContact_3, getContact_4, returnedValue = null;
 
     contact_1 = new tizen.Contact({
         name: new tizen.ContactName({
index 9e2e4639adcb89c31e4916273b06e1e941e740d1..86491e0a26ea8888edc1971ff0039eef25cf241a 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 var t = async_test("AddressBook_updateBatch_with_errorCallback");
 t.step(function () {
     var contact_1, contact_2, addressbook, updateBatchError, updateBatchSuccess, getContact_1,
-        getContact_2, returnedValue;
+        getContact_2, returnedValue = null;
     contact_1 = new tizen.Contact({
         name: new tizen.ContactName({
             firstName: "Jeffrey",
index c254e7e55bb7cec59a57778215a5a80a154863ed..38c37aee249a3a84a7a4ca71c45a7bc00712a803 100644 (file)
@@ -38,7 +38,7 @@ Authors:
 var t = async_test("AddressBook_updateBatch_with_successCallback");
 t.step(function () {
     var contact_1, contact_2, addressbook, updateBatchSuccess, getContact_1,
-        getContact_2, returnedValue;
+        getContact_2, returnedValue = null;
     contact_1 = new tizen.Contact({
         name: new tizen.ContactName({
             firstName: "Jeffrey",
index 0870d3a01e5b088c634953d6b2e28f9c88e462ef..57217a553002318bb3c59d3f531989c08571dfa6 100644 (file)
@@ -37,7 +37,7 @@ Authors:
 var t = async_test("ContactManager_updateBatch_with_errorCallback");
 t.step(function () {
     var contact_1, contact_2, addressbook, updateBatchError, updateBatchSuccess, getPerson_1,
-        getPerson_2, returnedValue;
+        getPerson_2, returnedValue = null;
     contact_1 = new tizen.Contact({
         name: new tizen.ContactName({
             firstName: "Jeffrey",
index e7c7622fbd4d6cc7f648f41accfb7a57ed3306ba..8f6aad1bb97f4db46814bfb47755aaab5c2d3916 100644 (file)
@@ -50,10 +50,11 @@ Authors:
 setup({timeout: 30000});
 
 var t = async_test("ContentManager_find", { timeout: 30000 }),
-    successCallback, errorCallback, retVal;
+    successCallback, errorCallback, retVal = null;
 
 t.step(function () {
     successCallback = t.step_func(function (contents) {
+        assert_equals(retVal, undefined, "find should return undefined");
         t.done();
     });
 
@@ -62,7 +63,6 @@ t.step(function () {
     });
 
     retVal = tizen.content.find(successCallback, errorCallback);
-    assert_equals(retVal, undefined, "find should return undefined");
 });
 
 </script>
index 2238455e41192ec6a8f02dab460aa6aa7ac56e4f..788fd5ab0af92fa5f5251cc03ddfa31af1bb97df 100644 (file)
@@ -37,12 +37,12 @@ Authors:
 //==== LABEL Check startSync with optional argument
 //==== SPEC Tizen Web API:Social:Datasync:DataSynchronizationManager:startSync M
 //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datasync.html
-//==== TEST_CRITERIA MOA
+//==== TEST_CRITERIA MOA MR
 
 var syncInfo = new tizen.SyncInfo(syncUrl, syncId, syncPassword, "MANUAL", "TWO_WAY"),
     contactInfo = new tizen.SyncServiceInfo(true, syncContactServiceType, syncServerContactDatabaseUri),
     eventInfo = new tizen.SyncServiceInfo(true, syncEventServiceType, syncServerEventDatabaseUri),
-    serviceInfo = [contactInfo, eventInfo],
+    serviceInfo = [contactInfo, eventInfo], retValue = null,
     profile = new tizen.SyncProfileInfo("MyProfile", syncInfo, serviceInfo), syncProgressCallback,
     t = async_test("DataSynchronizationManager_startSync_with_callback");
 
@@ -65,7 +65,8 @@ t.step(function () {
         })
     };
 
-    tizen.datasync.startSync(profile.profileId, syncProgressCallback);
+    retValue = tizen.datasync.startSync(profile.profileId, syncProgressCallback);
+    assert_equals(retValue, undefined, "Method startSync returns wrong value.");
     t.done();
 });