--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Tomasz Kusmierz <t.kusmierz@samsung.com>
+
+-->
+<html>
+<head>
+<title>MappedDataControlConsumer_getValue_error_invoked</title>
+<meta charset="utf-8"/>
+<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/datacontrol_common.js"></script>
+</head>
+
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: MappedDataControlConsumer_getValue_error_invoked
+//==== LABEL Check errorCallback invocation of MappedDataControlConsumer.getValue method
+//==== SPEC Tizen Web API:TBD:Datacontrol:MappedDataControlConsumer:getValue M
+//==== SPEC_URL https://developer.tizen.org/help/index.jsp?topic=/org.tizen.web.device.apireference/tizen/datacontrol.html
+//==== TIMEOUT 10
+//==== ONLOAD_DELAY 20
+//==== TEST_CRITERIA MERRCB
+setup({timeout: 10000});
+
+var t = async_test("MappedDataControlConsumer_getValue_error_invoked", {timeout: 10000}),
+ globalDataControl, globalReqId = generateGlobalReqId(),
+ currentDate = new Date().getTime().toString(), key = currentDate,
+ getSuccess, getError;
+
+t.step(function () {
+ getSuccess = t.step_func(function (values, reqId) {
+ assert_unreached("getValue() error Callback shoulkd be invoked.");
+ });
+ getError = t.step_func(function (reqId, error) {
+ assert_equals(reqId, globalReqId, "incorrect request id");
+ assert_equals(error.code, 8, "incorrect error code");
+ assert_equals(error.name, "NotFoundError", "incorrect exception name.");
+ assert_type(error.message, "string", "error.message is not a string");
+ assert_not_equals(error.message, "", "error.message is empty.");
+ t.done();
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_MAP);
+ globalDataControl.getValue(globalReqId, key, getSuccess, getError);
+});
+</script>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2013 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:
+ Tomasz Kusmierz <t.kusmierz@samsung.com>
+
+-->
+<html>
+<head>
+<title>MappedDataControlConsumer_updateValue_error_invoked</title>
+<meta charset="utf-8"/>
+<script type="text/javascript" src="../resources/unitcommon.js"></script>
+<script type="text/javascript" src="support/datacontrol_common.js"></script>
+</head>
+
+<body>
+<div id="log"></div>
+<script>
+//==== TEST: MappedDataControlConsumer_updateValue_error_invoked
+//==== LABEL Check errorCallback invocation of MappedDataControlConsumer.updateValue method
+//==== SPEC Tizen Web API:TBD:Datacontrol:MappedDataControlConsumer:updateValue M
+//==== SPEC_URL https://developer.tizen.org/help/index.jsp?topic=/org.tizen.web.device.apireference/tizen/datacontrol.html
+//==== TIMEOUT 10
+//==== ONLOAD_DELAY 20
+//==== TEST_CRITERIA MERRCB
+setup({timeout: 10000});
+
+var t = async_test("MappedDataControlConsumer_updateValue_error_invoked", {timeout: 10000}),
+ globalDataControl, globalReqId = generateGlobalReqId(),
+ currentDate = new Date().getTime().toString(), key = currentDate,
+ value = currentDate + "value",
+ updateSuccess, updateError;
+
+t.step(function () {
+ updateSuccess = t.step_func(function (values, reqId) {
+ assert_unreached("updateValue() error Callback shoulkd be invoked.");
+ });
+ updateError = t.step_func(function (reqId, error) {
+ assert_equals(reqId, globalReqId, "incorrect request id");
+ assert_equals(error.code, 8, "incorrect error code");
+ assert_equals(error.name, "NotFoundError", "incorrect exception name.");
+ assert_type(error.message, "string", "error.message is not a string");
+ assert_not_equals(error.message, "", "error.message is empty.");
+ t.done();
+ });
+
+ globalDataControl = tizen.datacontrol.getDataControlConsumer(PROVIDER_ID, DATA_ID, TYPE_MAP);
+ globalDataControl.updateValue(globalReqId, key, value, value + "2", updateSuccess, updateError);
+});
+</script>
+</body>
+</html>
</spec>
</specs>
</testcase>
+ <testcase purpose="Check errorCallback invocation of MappedDataControlConsumer.getValue method" type="compliance" onload_delay="20" status="approved" component="TizenAPI/TBD/Datacontrol" execution_type="auto" priority="P1" id="MappedDataControlConsumer_getValue_error_invoked">
+ <description>
+ <test_script_entry timeout="10">/opt/tct-datacontrol-tizen-tests/datacontrol/MappedDataControlConsumer_getValue_error_invoked.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="MappedDataControlConsumer" element_type="method" element_name="getValue" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/index.jsp?topic=/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase purpose="Check errorCallback invocation of MappedDataControlConsumer.updateValue method" type="compliance" onload_delay="20" status="approved" component="TizenAPI/TBD/Datacontrol" execution_type="auto" priority="P1" id="MappedDataControlConsumer_updateValue_error_invoked">
+ <description>
+ <test_script_entry timeout="10">/opt/tct-datacontrol-tizen-tests/datacontrol/MappedDataControlConsumer_updateValue_error_invoked.html</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion interface="MappedDataControlConsumer" element_type="method" element_name="updateValue" specification="Datacontrol" section="TBD" category="Tizen Device API Specifications"/>
+ <spec_url>https://developer.tizen.org/help/index.jsp?topic=/org.tizen.web.device.apireference/tizen/datacontrol.html</spec_url>
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
</set>
</suite>
</test_definition>