--- /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_ServiceNotAvailableError</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_ServiceNotAvailableError
+//==== LABEL Check if addChangeListener method throws exception when the application could not connect with the provider
+//==== 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}), globalDataControl, errorCallback, invalidCallback, exceptionName = "ServiceNotAvailableError";
+
+t.step(function () {
+ errorCallback = t.step_func(function (error) {
+ assert_unreached("addChangeListener() error callback: name:" + error.name + ", msg:" + error.message);
+ });
+
+ successCallback = t.step_func(function () {
+ assert_unreached("addChangeListener() success callback should not be invoked" );
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer("notExistingProvider", DATA_ID, TYPE_SQL);
+
+ assert_throws({name: exceptionName}, function () {
+ globalDataControl.addChangeListener(successCallback, errorCallback);
+ }, "exception should be thrown");
+
+ t.done();
+});
+
+</script>
+</body>
+</html>
\ No newline at end of file
</spec>
</specs>
</testcase>
+ <testcase purpose="Check if addChangeListener method throws exception when the application could not connect with the provider" type="compliance" status="approved" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_ServiceNotAvailableError">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_ServiceNotAvailableError.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>
<test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_misarg.html</test_script_entry>
</description>
</testcase>
+ <testcase purpose="Check if addChangeListener method throws exception when the application could not connect with the provider" component="Tizen Device APIs/TBD/Datacontrol" execution_type="auto" priority="P2" id="DataControlConsumerObject_addChangeListener_ServiceNotAvailableError">
+ <description>
+ <test_script_entry>/opt/tct-datacontrol-tizen-tests/datacontrol/DataControlConsumerObject_addChangeListener_ServiceNotAvailableError.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>