From: Piotr Szydelko Date: Thu, 26 Sep 2013 14:01:20 +0000 (+0200) Subject: [tizen-tests] improved returned value check of async methods X-Git-Tag: 2.2.1_release~105^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea1dc842328ae5100191ea9039b75ad5ff12ac9e;p=test%2Ftct%2Fweb%2Fapi.git [tizen-tests] improved returned value check of async methods Change-Id: I4a555a5d44fc12c3232d6338d122c8da32dd9fa4 --- diff --git a/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_oninstalled.html b/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_oninstalled.html index edfd3930b..f7300ec85 100644 --- a/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_oninstalled.html +++ b/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_oninstalled.html @@ -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"); }); diff --git a/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onuninstalled.html b/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onuninstalled.html index 3a679e637..cb75cf45d 100644 --- a/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onuninstalled.html +++ b/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onuninstalled.html @@ -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"); }); diff --git a/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onupdated.html b/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onupdated.html index 6edcc0a83..a05ac6c12 100644 --- a/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onupdated.html +++ b/tct-application-tizen-tests/application/ApplicationManager_addAppInfoEventListener_onupdated.html @@ -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"); }); diff --git a/tct-application-tizen-tests/application/ApplicationManager_launch.html b/tct-application-tizen-tests/application/ApplicationManager_launch.html index 2a22fec0c..bc17be831 100644 --- a/tct-application-tizen-tests/application/ApplicationManager_launch.html +++ b/tct-application-tizen-tests/application/ApplicationManager_launch.html @@ -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); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_errorCallback.html b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_errorCallback.html index defbc04c4..ad46b61a3 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_errorCallback.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_errorCallback.html @@ -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(); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_successCallback.html b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_successCallback.html index 0bd0070fd..35341f0c6 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_successCallback.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_addBatch_with_successCallback.html @@ -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(); diff --git a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch.html b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch.html index 86501f3f5..89dd6ec83 100644 --- a/tct-calendar-tizen-tests/calendar/Calendar_updateBatch.html +++ b/tct-calendar-tizen-tests/calendar/Calendar_updateBatch.html @@ -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); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener.html index 3fea94fff..b4f961327 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener.html @@ -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); } diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener_onadded.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener_onadded.html index 2f5376dc6..89f6b9383 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener_onadded.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_addChangeListener_onadded.html @@ -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); } diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null.html index 627f44a4a..b449f866d 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null_filter.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null_filter.html index 89f480f52..8075e4881 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null_filter.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_errorCallback_null_filter.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter.html index e6e16a7e9..829d7a150 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null.html index 6dbef2bcf..7e95518e2 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null_sortMode.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null_sortMode.html index b42529c25..f83902b2c 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null_sortMode.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_null_sortMode.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_limit_null_offset.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_limit_null_offset.html index cdee2d9f0..3eb31703a 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_limit_null_offset.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_limit_null_offset.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_null.html index 92fb851db..f9cb8e043 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_filter_sortMode_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit.html index a9e3bd6bf..85dd9a51f 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_0.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_0.html index 9b94bcdbb..7bb02711f 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_0.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_0.html @@ -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) { diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_1.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_1.html index 2d0e4ceef..0e513f3a3 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_1.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_1.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_null.html index 5b81f6a89..66a984ac6 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_limit_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_nullableArgs_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_nullableArgs_null.html index 46f859aff..1d07dcfdf 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_nullableArgs_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_nullableArgs_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset.html index 1d38517b7..e47950449 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_0.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_0.html index 94523e3fd..3554c91f0 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_0.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_0.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_null.html index beb587462..34f560e00 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_offset_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode.html index 549e55df9..a52e160d3 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode_null.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode_null.html index 4123bc6f9..398372a34 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode_null.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_sortMode_null.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_errorCallback.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_errorCallback.html index 9302c8b0d..4397cd04b 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_errorCallback.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_errorCallback.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_filter.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_filter.html index bb97075f0..a3ccd0173 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_filter.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_filter.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_limit.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_limit.html index 3cd4bc895..c532da67f 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_limit.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_limit.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_offset.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_offset.html index c675204cb..370533b5c 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_offset.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_offset.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_sortMode.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_sortMode.html index 873ec8b59..a161b169b 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_sortMode.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_with_sortMode.html @@ -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"); }); diff --git a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_without_errorCallback.html b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_without_errorCallback.html index 89e1fef76..a922ead85 100644 --- a/tct-callhistory-tizen-tests/callhistory/CallHistory_find_without_errorCallback.html +++ b/tct-callhistory-tizen-tests/callhistory/CallHistory_find_without_errorCallback.html @@ -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"); }); diff --git a/tct-contact-tizen-tests/contact/AddressBook_addBatch_with_successCallback.html b/tct-contact-tizen-tests/contact/AddressBook_addBatch_with_successCallback.html index e8dd25fe5..79538f3b8 100644 --- a/tct-contact-tizen-tests/contact/AddressBook_addBatch_with_successCallback.html +++ b/tct-contact-tizen-tests/contact/AddressBook_addBatch_with_successCallback.html @@ -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 () { diff --git a/tct-contact-tizen-tests/contact/AddressBook_removeBatch_errorCallback_invoked.html b/tct-contact-tizen-tests/contact/AddressBook_removeBatch_errorCallback_invoked.html index 25ec19658..6105fb6a7 100644 --- a/tct-contact-tizen-tests/contact/AddressBook_removeBatch_errorCallback_invoked.html +++ b/tct-contact-tizen-tests/contact/AddressBook_removeBatch_errorCallback_invoked.html @@ -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."); }); diff --git a/tct-contact-tizen-tests/contact/AddressBook_updateBatch.html b/tct-contact-tizen-tests/contact/AddressBook_updateBatch.html index fb40dd743..d05569fe2 100644 --- a/tct-contact-tizen-tests/contact/AddressBook_updateBatch.html +++ b/tct-contact-tizen-tests/contact/AddressBook_updateBatch.html @@ -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({ diff --git a/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_errorCallback.html b/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_errorCallback.html index 9e2e4639a..86491e0a2 100644 --- a/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_errorCallback.html +++ b/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_errorCallback.html @@ -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", diff --git a/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_successCallback.html b/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_successCallback.html index c254e7e55..38c37aee2 100644 --- a/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_successCallback.html +++ b/tct-contact-tizen-tests/contact/AddressBook_updateBatch_with_successCallback.html @@ -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", diff --git a/tct-contact-tizen-tests/contact/ContactManager_updateBatch_with_errorCallback.html b/tct-contact-tizen-tests/contact/ContactManager_updateBatch_with_errorCallback.html index 0870d3a01..57217a553 100644 --- a/tct-contact-tizen-tests/contact/ContactManager_updateBatch_with_errorCallback.html +++ b/tct-contact-tizen-tests/contact/ContactManager_updateBatch_with_errorCallback.html @@ -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", diff --git a/tct-content-tizen-tests/content/ContentManager_find.html b/tct-content-tizen-tests/content/ContentManager_find.html index e7c7622fb..8f6aad1bb 100644 --- a/tct-content-tizen-tests/content/ContentManager_find.html +++ b/tct-content-tizen-tests/content/ContentManager_find.html @@ -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"); }); diff --git a/tct-datasync-tizen-tests/datasync/DataSynchronizationManager_startSync_with_callback.html b/tct-datasync-tizen-tests/datasync/DataSynchronizationManager_startSync_with_callback.html index 2238455e4..788fd5ab0 100644 --- a/tct-datasync-tizen-tests/datasync/DataSynchronizationManager_startSync_with_callback.html +++ b/tct-datasync-tizen-tests/datasync/DataSynchronizationManager_startSync_with_callback.html @@ -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(); });