<access origin="*"/>
<name>tct-datacontrol-tizen-tests</name>
<tizen:privilege name="http://tizen.org/privilege/datacontrol.consumer"/>
+ <tizen:privilege name="http://tizen.org/privilege/datasharing"/>
+ <tizen:privilege name="http://tizen.org/privilege/appmanager.launch"/>
<icon src="icon.png" height="117" width="117"/>
<tizen:application id="api1daco00.WebAPITizenDatacontrolTests" package="api1daco00" required_version="4.0"/>
<tizen:setting screen-orientation="landscape" />
--- /dev/null
+<!DOCTYPE html>
+
+<!--
+
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+<html>
+<head>
+<title>DataControlChangeCallback_notexist</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlChangeCallback_notexist
+//==== LABEL Check if DataControlChangeCallback notexist
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlChangeCallback:DataControlChangeCallback U
+//==== SPEC_URL TBD
+//==== PRIORITY P3
+//==== TEST_CRITERIA CBNIO
+
+test(function () {
+ check_no_interface_object("DataControlChangeCallback");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+
+<!--
+
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+<html>
+<head>
+<title>DataControlChangeCallback_onsuccess</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DataControlChangeCallback_onsuccess
+//==== LABEL Check if callback is called and if its arguments have proper type - DataControlChangeCallback
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlChangeCallback:onsuccess U
+//==== SPEC_URL TBD
+//==== ONLOAD_DELAY 30
+//==== TEST_CRITERIA CBOA CBT
+//==== PRIORITY P3
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), globalDataControl, globalReqId = generateGlobalReqId(), watchId, currentDate = new Date().getTime().toString(),
+ rowData, descriptionToSet = currentDate + "_desc", returnedValue = null, dataChangeSuccessCallback;
+t.step(function () {
+
+ rowData = {
+ columns: ["WORD", "WORD_DESC"],
+ values: ["'" + currentDate + "'", "'" + descriptionToSet + "'"]
+ };
+
+ dataChangeSuccessCallback = t.step_func(function (eventType, rowData) {
+ assert_equals(returnedValue, undefined, "Incorrect returned value");
+ assert_equals(eventType, "SQL_INSERT", "incorrect request eventType");
+ assert_type(rowData, "object", "rowData is not object");
+ globalDataControl.removeChangeListener(watchId);
+ t.done();
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+ returnedValue = globalDataControl.addChangeListener(dataChangeSuccessCallback);
+ alert(returnedValue);
+ globalReqId++;
+ globalDataControl.insert(globalReqId, rowData);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+<html>
+<head>
+<title>DataControlConsumerObject_addChangeListener</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DataControlConsumerObject_addChangeListener
+//==== LABEL Check DataControlConsumerObject addChangeListener method works properly
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== ONLOAD_DELAY 30
+//==== TEST_CRITERIA MR MMINA MAST
+//==== PRIORITY P1
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), globalDataControl, globalReqId = generateGlobalReqId(), watchId, currentDate = new Date().getTime().toString(),
+ rowData, descriptionToSet = currentDate + "_desc", returnedValue = null, dataChangeSuccessCallback;
+t.step(function () {
+
+ rowData = {
+ columns: ["WORD", "WORD_DESC"],
+ values: ["'" + currentDate + "'", "'" + descriptionToSet + "'"]
+ };
+
+ dataChangeSuccessCallback = t.step_func(function (eventType, rowData) {
+ globalDataControl.removeChangeListener(watchId);
+ t.done();
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+ returnedValue = globalDataControl.addChangeListener(dataChangeSuccessCallback);
+ globalReqId++;
+ globalDataControl.insert(globalReqId, rowData);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+
+<head>
+<title>DataControlConsumerObject_addChangeListener_dataChangeCallback_TypeMismatch</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_addChangeListener_dataChangeCallback_TypeMismatch
+//==== LABEL Check type conversions for dataChangeCallback argument of addChangeListener method
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MC
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), i, globalDataControl, errorCallback, conversionTable;
+
+t.step(function () {
+ conversionTable = getTypeConversionExceptions("functionObject", false);
+
+ errorCallback = t.step_func(function () {
+ assert_unreached("addChangeListener() error callback invoked");
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+
+ for (i = 0; i < conversionTable.length; i++) {
+ assert_throws({name: conversionTable[i][1]}, function () {
+ globalDataControl.addChangeListener(conversionTable[i][0], errorCallback);
+ }, "exception should be thrown. Given - " + conversionTable[i][0]);
+ }
+ t.done();
+
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+
+<head>
+<title>DataControlConsumerObject_addChangeListener_dataChangeCallback_invalid_cb</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_addChangeListener_dataChangeCallback_invalid_cb
+//==== LABEL Check if addChangeListener method throws exception when dataChangeCallback is invalid
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MTCB
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), globalDataControl, errorCallback, invalidCallback;
+
+t.step(function () {
+ errorCallback = t.step_func(function () {
+ assert_unreached("addChangeListener() error callback invoked");
+ });
+
+ invalidCallback = {
+ onsuccess: t.step_func(function (type, data) {
+ assert_unreached("addChangeListener() invalid success callback invoked");
+ })
+ };
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+ globalDataControl.addChangeListener(invalidCallback, errorCallback);
+ }, "exception should be thrown");
+
+ t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+
+<head>
+<title>DataControlConsumerObject_addChangeListener_errorCallback_TypeMismatch</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_addChangeListener_errorCallback_TypeMismatch
+//==== LABEL Check type conversions for errorCallback argument of addChangeListener method
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MC
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), i, globalDataControl, dataChangeSuccessCallback, conversionTable;
+
+t.step(function () {
+ conversionTable = getTypeConversionExceptions("functionObject", true);
+
+ dataChangeSuccessCallback = t.step_func(function (type, data) {
+ assert_unreached("addChangeListener() success callback invoked");
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+
+ for (i = 0; i < conversionTable.length; i++) {
+ assert_throws({name: conversionTable[i][1]}, function () {
+ globalDataControl.addChangeListener(dataChangeSuccessCallback, conversionTable[i][0]);
+ }, "exception should be thrown. Given - " + conversionTable[i][0]);
+ }
+ t.done();
+
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+
+<head>
+<title>DataControlConsumerObject_addChangeListener_errorCallback_invalid_cb</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_addChangeListener_errorCallback_invalid_cb
+//==== LABEL Check if addChangeListener method throws exception when errorCallback is invalid
+//==== ONLOAD_DELAY 30
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P2
+//==== TEST_CRITERIA MTCB
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), globalDataControl, dataChangeSuccessCallback, invalidCallback;
+
+t.step(function () {
+ dataChangeSuccessCallback = t.step_func(function () {
+ assert_unreached("addChangeListener() success callback invoked");
+ });
+
+ invalidCallback = {
+ onerror: t.step_func(function (error) {
+ assert_unreached("addChangeListener() invalid error callback invoked");
+ })
+ };
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
+ globalDataControl.addChangeListener(dataChangeSuccessCallback, invalidCallback);
+ }, "exception should be thrown");
+
+ t.done();
+
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+
+<!--
+
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+<head>
+<title>DataControlConsumerObject_addChangeListener_exist</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_addChangeListener_exist
+//==== LABEL Check if method addChangeListener exist
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+ var globalDataControl;
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+ check_method_exists(globalDataControl, "addChangeListener");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+<html>
+<head>
+<title>DataControlConsumerObject_addChangeListener_misarg</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DataControlConsumerObject_addChangeListener_misarg
+//==== LABEL Check addChangeListener method missing non-optional argument will throw exception
+//==== SPEC Tizen Web API:TBD:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== TEST_CRITERIA MMA
+//==== PRIORITY P2
+
+test(function () {
+ var globalDataControl, exceptionName = "TypeMismatchError";
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+
+ assert_throws({name: exceptionName},
+ function () {
+ globalDataControl.addChangeListener();
+ }, exceptionName + " should be thrown - missing RowData object.");
+
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+-->
+<html>
+<head>
+<title>DataControlConsumerObject_addChangeListener_with_errorCallback</title>
+<meta charset="utf-8"/>
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: DataControlConsumerObject_addChangeListener_with_errorCallback
+//==== LABEL Check DataControlConsumerObject addChangeListener method with errorCallback
+//==== SPEC Tizen Web API:TBD:Datacontrol:DataControlConsumerObject:addChangeListener M
+//==== SPEC_URL TBD
+//==== ONLOAD_DELAY 30
+//==== TEST_CRITERIA MR MOA MAST
+//==== PRIORITY P1
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), globalDataControl, globalReqId = generateGlobalReqId(), currentDate = new Date().getTime().toString(),
+ rowData, descriptionToSet = currentDate + "_desc", returnedValue = null, dataChangeSuccessCallback, errorCallback;
+t.step(function () {
+
+ rowData = {
+ columns: ["WORD", "WORD_DESC"],
+ values: ["'" + currentDate + "'", "'" + descriptionToSet + "'"]
+ };
+
+ errorCallback = t.step_func(function (error) {
+ assert_unreached("addChangeListener() error callback: name:" + error.name + ", msg:" + error.message);
+ });
+
+ dataChangeSuccessCallback = t.step_func(function (eventType, rowData) {
+ assert_equals(returnedValue, undefined, "Incorrect returned value");
+ assert_equals(eventType, "SQL_INSERT", "incorrect request eventType");
+ assert_type(rowData, "object", "rowData is not object");
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+ returnedValue = globalDataControl.addChangeListener(dataChangeSuccessCallback, errorCallback);
+ globalReqId++;
+ globalDataControl.insert(globalReqId, rowData);
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+
+<!--
+
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+<head>
+<title>DataControlConsumerObject_removeChangeListener</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_removeChangeListener
+//==== LABEL Check if removeChangeListener method works properly
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:removeChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P1
+//==== TEST_CRITERIA MR
+
+setup({timeout: 30000});
+
+var t = async_test(document.title, {timeout: 30000}), globalDataControl, dataChangeSuccessCallback, watchId, retVal;
+t.step(function () {
+ dataChangeSuccessCallback = t.step_func(function (eventType, rowData) {
+ assert_unreached("This function should not be used");
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+ watchId = globalDataControl.addChangeListener(dataChangeSuccessCallback);
+ retVal = globalDataControl.removeChangeListener(watchId);
+ assert_type(retVal, "undefined", "this method should return nothing");
+ t.done();
+
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html>
+
+<!--
+
+Copyright (c) 2017 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Authors:
+ Xiaoyan Qian <xy.qian@samsung.com>
+
+
+-->
+
+<html>
+<head>
+<title>DataControlConsumerObject_removeChangeListener_exist</title>
+<meta charset="utf-8">
+<script src="support/unitcommon.js"></script>
+<script src="support/datacontrol_common.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<script>
+
+//==== TEST: DataControlConsumerObject_removeChangeListener_exist
+//==== LABEL Check if method removeChangeListener exist
+//==== SPEC Tizen Web API:Application:Datacontrol:DataControlConsumerObject:removeChangeListener M
+//==== SPEC_URL TBD
+//==== PRIORITY P0
+//==== TEST_CRITERIA ME
+
+test(function () {
+ var globalDataControl;
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_SQL);
+ check_method_exists(globalDataControl, "removeChangeListener");
+}, document.title);
+
+</script>
+</body>
+</html>
\ No newline at end of file
</spec>
</specs>
</testcase>
+ <testcase purpose="Check if DataControlChangeCallback notexist" type="compliance" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P3" id="DataControlChangeCallback_notexist">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlChangeCallback_notexist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlChangeCallback" usage="true" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if callback is called and if its arguments have proper type - DataControlChangeCallback" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P3" id="DataControlChangeCallback_onsuccess">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlChangeCallback_onsuccess.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlChangeCallback" usage="true" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check DataControlConsumerObject addChangeListener method works properly" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P1" id="DataControlConsumerObject_addChangeListener">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check type conversions for dataChangeCallback argument of addChangeListener method" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_dataChangeCallback_TypeMismatch">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_dataChangeCallback_TypeMismatch.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if addChangeListener method throws exception when dataChangeCallback is invalid" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_dataChangeCallback_invalid_cb">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_dataChangeCallback_invalid_cb.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check type conversions for errorCallback argument of addChangeListener method" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_errorCallback_TypeMismatch">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_errorCallback_TypeMismatch.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if addChangeListener method throws exception when errorCallback is invalid" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_errorCallback_invalid_cb">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_errorCallback_invalid_cb.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if method addChangeListener exist" type="compliance" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P0" id="DataControlConsumerObject_addChangeListener_exist">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check addChangeListener method missing non-optional argument will throw exception" type="compliance" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_misarg">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_misarg.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check DataControlConsumerObject addChangeListener method with errorCallback" type="compliance" onload_delay="30" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P1" id="DataControlConsumerObject_addChangeListener_with_errorCallback">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_with_errorCallback.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="addChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if removeChangeListener method works properly" type="compliance" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P1" id="DataControlConsumerObject_removeChangeListener">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_removeChangeListener.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="removeChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check if method removeChangeListener exist" type="compliance" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P0" id="DataControlConsumerObject_removeChangeListener_exist">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_removeChangeListener_exist.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="DataControlConsumerObject" element_type="method" element_name="removeChangeListener" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
</set>
</suite>
</test_definition>
<test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/SQLDataControlConsumer_update_without_successCallback.html</test_script_entry>
</description>
</testcase>
+ <testcase purpose="Check if DataControlChangeCallback notexist" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P3" id="DataControlChangeCallback_notexist">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlChangeCallback_notexist.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check if callback is called and if its arguments have proper type - DataControlChangeCallback" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P3" id="DataControlChangeCallback_onsuccess">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlChangeCallback_onsuccess.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check DataControlConsumerObject addChangeListener method works properly" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P1" id="DataControlConsumerObject_addChangeListener">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check type conversions for dataChangeCallback argument of addChangeListener method" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_dataChangeCallback_TypeMismatch">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_dataChangeCallback_TypeMismatch.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check if addChangeListener method throws exception when dataChangeCallback is invalid" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_dataChangeCallback_invalid_cb">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_dataChangeCallback_invalid_cb.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check type conversions for errorCallback argument of addChangeListener method" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_errorCallback_TypeMismatch">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_errorCallback_TypeMismatch.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check if addChangeListener method throws exception when errorCallback is invalid" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_errorCallback_invalid_cb">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_errorCallback_invalid_cb.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check if method addChangeListener exist" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P0" id="DataControlConsumerObject_addChangeListener_exist">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_exist.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check addChangeListener method missing non-optional argument will throw exception" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_misarg">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_misarg.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check DataControlConsumerObject addChangeListener method with errorCallback" onload_delay="30" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P1" id="DataControlConsumerObject_addChangeListener_with_errorCallback">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_with_errorCallback.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check if removeChangeListener method works properly" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P1" id="DataControlConsumerObject_removeChangeListener">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_removeChangeListener.html</test_script_entry>
+ </description>
+ </testcase>
+ <testcase purpose="Check if method removeChangeListener exist" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P0" id="DataControlConsumerObject_removeChangeListener_exist">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_removeChangeListener_exist.html</test_script_entry>
+ </description>
+ </testcase>
</set>
</suite>
</test_definition>