Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CBNIO
test(function () {
- check_no_interface_object("BluetoothAdapterChangeCallback");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothAdapterChangeCallback");
+ }
}, document.title);
</script>
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
- ByungWoo Lee <bw1212.lee@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
+ByungWoo Lee <bw1212.lee@samsung.com>
-->
<html>
setup({timeout: 180000});
var powerOnSuccess, adapter, listener, t = async_test(document.title, {timeout: 180000}), testName;
t.step(function () {
- listener = {
- onstatechanged: t.step_func(function (powered) {
- }),
- onnamechanged: t.step_func(function (name) {
- assert_type(name, "string", "Argument name has wrong type.");
- if (name === testName) {
- adapter.unsetChangeListener();
- t.done();
- }
- }),
- onvisibilitychanged: t.step_func(function (visible) {
- })
- };
+ if (BT_SUPPORT) { // network.bluetooth support
+ listener = {
+ onstatechanged: t.step_func(function (powered) {
+ }),
+ onnamechanged: t.step_func(function (name) {
+ assert_type(name, "string", "Argument name has wrong type.");
+ if (name === testName) {
+ adapter.unsetChangeListener();
+ t.done();
+ }
+ }),
+ onvisibilitychanged: t.step_func(function (visible) {
+ })
+ };
- powerOnSuccess = t.step_func(function () {
- adapter.setChangeListener(listener);
- testName = adapter.name + "_changed";
- adapter.setName(testName);
- });
+ powerOnSuccess = t.step_func(function () {
+ adapter.setChangeListener(listener);
+ testName = adapter.name + "_changed";
+ adapter.setName(testName);
+ });
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ setPowered(t, adapter, powerOnSuccess);
+
+ } else {
+ t.done();
+ }
});
</script>
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapterChangeCallback_onstatechanged</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapterChangeCallback_onstatechanged
-//==== LABEL Check onstatechanged listener is invoked after turn bluetooth off
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onstatechanged M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth/visible of the test device MUST be turned on.
-//==== STEP Turn off Bluetooth after run.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA CBT CBOA
-
-setup({timeout: 180000});
-
-var adapter, listener, value, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
- listener = {
- onstatechanged: t.step_func(function (powered) {
- assert_type(powered, "boolean", "Argument powered has wrong type.");
- assert_equals(powered, value, "Argument powered has wrong value.");
- adapter.unsetChangeListener();
- t.done();
- }),
- onnamechanged: t.step_func(function (name) {
- }),
- onvisibilitychanged: t.step_func(function (visible) {
- })
- };
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- value = !adapter.powered;
- adapter.setChangeListener(listener);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapterChangeCallback_onstatechanged</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapterChangeCallback_onstatechanged\r
+//==== LABEL Check onstatechanged listener is invoked after turn bluetooth off\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onstatechanged M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth/visible of the test device MUST be turned on.\r
+//==== STEP Turn off Bluetooth after run.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, listener, value, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ listener = {\r
+ onstatechanged: t.step_func(function (powered) {\r
+ assert_type(powered, "boolean", "Argument powered has wrong type.");\r
+ assert_equals(powered, value, "Argument powered has wrong value.");\r
+ adapter.unsetChangeListener();\r
+ t.done();\r
+ }),\r
+ onnamechanged: t.step_func(function (name) {\r
+ }),\r
+ onvisibilitychanged: t.step_func(function (visible) {\r
+ })\r
+ };\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ value = !adapter.powered;\r
+ adapter.setChangeListener(listener);\r
+\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
- ByungWoo Lee <bw1212.lee@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapterChangeCallback_onvisibilitychanged</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapterChangeCallback_onvisibilitychanged
-//==== LABEL Check onvisibilitychanged listener is invoked after change bluetooth visible state
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onvisibilitychanged M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth/visible of the test device MUST be turned on.
-//==== STEP Change bluetooth visible to "Off".
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout: 180000});
-var powerOnSuccess, adapter, listener, value, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
- listener = {
- onstatechanged: t.step_func(function (powered) {
- }),
- onnamechanged: t.step_func(function (name) {
- }),
- onvisibilitychanged: t.step_func(function (visible) {
- assert_type(visible, "boolean", "Argument visible has wrong type.");
- assert_equals(visible, value, "Argument visible has wrong value.");
- adapter.unsetChangeListener();
- t.done();
- })
- };
- adapter = tizen.bluetooth.getDefaultAdapter();
- value = !adapter.visible;
- adapter.setChangeListener(listener);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+ByungWoo Lee <bw1212.lee@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapterChangeCallback_onvisibilitychanged</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapterChangeCallback_onvisibilitychanged\r
+//==== LABEL Check onvisibilitychanged listener is invoked after change bluetooth visible state\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapterChangeCallback:onvisibilitychanged M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth/visible of the test device MUST be turned on.\r
+//==== STEP Change bluetooth visible to "Off".\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout: 180000});\r
+var powerOnSuccess, adapter, listener, value, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ listener = {\r
+ onstatechanged: t.step_func(function (powered) {\r
+ }),\r
+ onnamechanged: t.step_func(function (name) {\r
+ }),\r
+ onvisibilitychanged: t.step_func(function (visible) {\r
+ assert_type(visible, "boolean", "Argument visible has wrong type.");\r
+ assert_equals(visible, value, "Argument visible has wrong value.");\r
+ adapter.unsetChangeListener();\r
+ t.done();\r
+ })\r
+ };\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ value = !adapter.visible;\r
+ adapter.setChangeListener(listener);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== TEST_CRITERIA AE AT ARO
var adapter = null;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- check_readonly(adapter, "address", adapter.address, "string", "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+adapter = tizen.bluetooth.getDefaultAdapter();
+check_readonly(adapter, "address", adapter.address, "string", "Tizen");
+ }
+ }, document.title);
</script>
</body>
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding
-//==== LABEL Check with non-optional arguments createBonding(valid_address, valid_successCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), createBondingSuccess,
- powerOnSuccess, retValue = null;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- createBondingSuccess = t.step_func(function (device) {
- check_bluetooth_device(device);
- assert_equals(retValue, undefined, "createBonding returns wrong value");
- t.done();
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- retValue = adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding\r
+//==== LABEL Check with non-optional arguments createBonding(valid_address, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), createBondingSuccess,\r
+ powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ createBondingSuccess = t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+ assert_equals(retValue, undefined, "createBonding returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ retValue = adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_bondingDevice</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_bondingDevice
-//==== LABEL Check using createBonding method which is in BluetoothAdapter interface to bond device
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-// discoverDevices, createBonding, destroyBonding methods in BluetoothAdapter interface usage test
-var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCallback,
- destroyBondingSuccess, destroyBondingError, onBondingSuccess, onBondingError, discoverDevicesError,
- stopDiscoverySuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func (function () {
- }),
- ondevicefound: t.step_func (function (device) {
- }),
- ondevicedisappeared: t.step_func (function (address) {
- }),
- onfinished: t.step_func (function (devices) {
- if (devices.length > 0) {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- } else {
- setTimeout(setstopDiscoverySuccess, 1000);
- }
- })
- };
-
- destroyBondingSuccess = t.step_func(function () {
- t.done();
- });
-
- destroyBondingError = t.step_func(function (e) {
- assert_unreached("destroyBondingError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, destroyBondingError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_bondingDevice</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_bondingDevice\r
+//==== LABEL Check using createBonding method which is in BluetoothAdapter interface to bond device\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+// discoverDevices, createBonding, destroyBonding methods in BluetoothAdapter interface usage test\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCallback,\r
+ destroyBondingSuccess, destroyBondingError, onBondingSuccess, onBondingError, discoverDevicesError,\r
+ stopDiscoverySuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ } else {\r
+ setTimeout(setstopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ destroyBondingSuccess = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ destroyBondingError = t.step_func(function (e) {\r
+ assert_unreached("destroyBondingError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, destroyBondingError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_callback_onerror
-//==== LABEL Check if error callback of createBonding method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onBondingError, onBondingSuccess;
-t.step(function (){
-
- onBondingSuccess = t.step_func(function (device) {
- assert_unreached("Method createBonding shouldn't end successful.");
- });
-
- onBondingError = t.step_func(function (e) {
- assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in createBonding.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_callback_onerror\r
+//==== LABEL Check if error callback of createBonding method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+onBondingSuccess = t.step_func(function (device) {\r
+ assert_unreached("Method createBonding shouldn't end successful.");\r
+});\r
+\r
+onBondingError = t.step_func(function (e) {\r
+ assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in createBonding.");\r
+ t.done();\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_deviceaddress_correct</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_deviceaddress_correct
-//==== LABEL Check if device address is correct
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_deviceaddress_correct</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_deviceaddress_correct\r
+//==== LABEL Check if device address is correct\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_devicebonded</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_devicebonded
-//==== LABEL Check if device is bonded
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_devicebonded</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_devicebonded\r
+//==== LABEL Check if device is bonded\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ assert_equals(device.address, REMOTE_DEVICE_ADDRESS, "device address in onBondingSuccess");\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_devicename_correct</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_devicename_correct
-//==== LABEL Check if device name is correct
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- assert_equals(device.name, REMOTE_DEVICE_NAME, "device name in onBondingSuccess");
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_devicename_correct</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_devicename_correct\r
+//==== LABEL Check if device name is correct\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ assert_equals(device.name, REMOTE_DEVICE_NAME, "device name in onBondingSuccess");\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_deviceuuid_correct</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_createBonding_deviceuuid_correct
-//==== LABEL Check if device uuid is correct
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess,
- message = "UUIDs: \n", i;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- for(i = 0; i < device.uuids.length; i ++) {
- message += device.uuids[i] + " \n";
- if(device.uuids[i] === CHAT_SERVICE_UUID) {
- t.done();
- }
- }
- assert_unreached("Bonding device uuid is not CHAT_SERVICE_UUID. " + message);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_deviceuuid_correct</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_createBonding_deviceuuid_correct\r
+//==== LABEL Check if device uuid is correct\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess,\r
+ message = "UUIDs: \n", i;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ for (i = 0; i < device.uuids.length; i++) {\r
+ message += device.uuids[i] + " \n";\r
+ if (device.uuids[i] === CHAT_SERVICE_UUID) {\r
+ t.done();\r
+ }\r
+ }\r
+ assert_unreached("Bonding device uuid is not CHAT_SERVICE_UUID. " + message);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_errorCallback_TypeMismatch
-//==== LABEL Check whether createBonding() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, successCallback, powerOnSuccess, errorCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("Method createBonding shouldn't end successfully. Given incorrect errorCallback.");
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_errorCallback_TypeMismatch\r
+//==== LABEL Check whether createBonding() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, successCallback, powerOnSuccess, errorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method createBonding shouldn't end successfully. Given incorrect errorCallback.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_errorCallback_invalid_cb
-//==== LABEL Check argument createBonding() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- incorrectCallback, createBondingSuccess, powerOnSuccess;
-t.step(function () {
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- createBondingSuccess = t.step_func(function () {
- assert_unreached("Method createBonding shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_errorCallback_invalid_cb\r
+//==== LABEL Check argument createBonding() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ incorrectCallback, createBondingSuccess, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ createBondingSuccess = t.step_func(function () {\r
+ assert_unreached("Method createBonding shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("createBonding" in adapter, "Method createBonding does not exist in bluetooth adapter.");
- check_method_exists(adapter, "createBonding");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("createBonding" in adapter, "Method createBonding does not exist in bluetooth adapter.");
+check_method_exists(adapter, "createBonding");
+ }
+ }, document.title);
</script>
</body>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_missarg
-//==== LABEL Check createBonding with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function (){
-
- powerOnSuccess = t.step_func(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.createBonding();
- }, "Method with non optional argument.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_missarg\r
+//==== LABEL Check createBonding with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ adapter.createBonding();\r
+ }, "Method with non optional argument.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_successCallback_TypeMismatch
-//==== LABEL Check whether createBonding() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}),
- adapter, exceptionName, i, errorCallback, powerOnSuccess, successCallback,
- conversionTable = getTypeConversionExceptions("functionObject", false);
-t.step(function () {
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_successCallback_TypeMismatch\r
+//==== LABEL Check whether createBonding() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}),\r
+ adapter, exceptionName, i, errorCallback, powerOnSuccess, successCallback,\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_createBonding_successCallback_invalid_cb
-//==== LABEL Check argument createBonding() successCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- incorrectCallback, createBondingError, powerOnSuccess;
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method createBonding shouldn't end successfully.");
- })
- };
-
- createBondingError = t.step_func(function (e) {
- assert_unreached("createBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, createBondingError);
- }, "Given incorrect successCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_createBonding_successCallback_invalid_cb\r
+//==== LABEL Check argument createBonding() successCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ incorrectCallback, createBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method createBonding shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ createBondingError = t.step_func(function (e) {\r
+ assert_unreached("createBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, createBondingError);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_createBonding_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-
-//==== TEST: BluetoothAdapter_createBonding_with_errorCallback
-//==== LABEL Check if successful callback of createBonding method invoked
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- createBondingSuccess, createBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- createBondingSuccess = t.step_func(function (device) {
- check_bluetooth_device(device);
- t.done();
-
- });
-
- createBondingError = t.step_func(function (e) {
- assert_unreached("createBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, createBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_createBonding_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+\r
+//==== TEST: BluetoothAdapter_createBonding_with_errorCallback\r
+//==== LABEL Check if successful callback of createBonding method invoked\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ createBondingSuccess, createBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ createBondingSuccess = t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+ t.done();\r
+\r
+ });\r
+\r
+ createBondingError = t.step_func(function (e) {\r
+ assert_unreached("createBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, createBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.createBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
- }, "Given incorrect successCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.createBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
+ }, "Given incorrect successCallback.");
+ }
}
}, document.title);
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding
-//==== LABEL Check with non-optional arguments destroyBonding(valid_address)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;
-t.step(function () {
- onBondingSuccess = t.step_func(function () {
- retValue = adapter.destroyBonding(REMOTE_DEVICE_ADDRESS);
-
- assert_equals(retValue, undefined, "destroyBonding returns wrong value");
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding\r
+//==== LABEL Check with non-optional arguments destroyBonding(valid_address)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ retValue = adapter.destroyBonding(REMOTE_DEVICE_ADDRESS);\r
+\r
+ assert_equals(retValue, undefined, "destroyBonding returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_callback_onerror
-//==== LABEL Check if error callback of destroyBonding method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onDestroySuccess, onDestroyError;
-t.step(function () {
-
- onDestroySuccess = t.step_func(function () {
- assert_unreached("onDestroySuccess shouldn't be here");
- });
-
- onDestroyError = t.step_func(function (e) {
- assert_equals(e.name, "ServiceNotAvailableError", "error name in onDestroyError");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, onDestroySuccess, onDestroyError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_callback_onerror\r
+//==== LABEL Check if error callback of destroyBonding method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, onDestroySuccess, onDestroyError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+onDestroySuccess = t.step_func(function () {\r
+ assert_unreached("onDestroySuccess shouldn't be here");\r
+});\r
+\r
+onDestroyError = t.step_func(function (e) {\r
+ assert_equals(e.name, "ServiceNotAvailableError", "error name in onDestroyError");\r
+ t.done();\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, onDestroySuccess, onDestroyError);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch
-//==== LABEL Check whether destroyBonding() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}),
- adapter, exceptionName, i, successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess,
- conversionTable = getTypeConversionExceptions("functionObject", true);
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- successCallback = t.step_func(function () {
- assert_unreached("Method destroyBonding shouldn't end successfully.");
- });
-
- onBondingSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch\r
+//==== LABEL Check whether destroyBonding() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}),\r
+ adapter, exceptionName, i, successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess,\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method destroyBonding shouldn't end successfully.");\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_invalid_cb
-//==== LABEL Check if destroyBonding() method throws exception when invalid error callback is given
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}),
- adapter, exceptionName = "TypeMismatchError", incorrectCallback, destroyBondingSuccess,
- onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- incorrectCallback = {
- onerror: t.step_func(function (e) {
- assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
- })
- };
-
- destroyBondingSuccess = t.step_func(function (e) {
- assert_unreached("Method destroyBonding shouldn't end successfully.");
- });
-
- onBondingSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_errorCallback_invalid_cb\r
+//==== LABEL Check if destroyBonding() method throws exception when invalid error callback is given\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}),\r
+ adapter, exceptionName = "TypeMismatchError", incorrectCallback, destroyBondingSuccess,\r
+ onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (e) {\r
+ assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+ })\r
+ };\r
+\r
+ destroyBondingSuccess = t.step_func(function (e) {\r
+ assert_unreached("Method destroyBonding shouldn't end successfully.");\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("destroyBonding" in adapter, "Method destroyBonding does not exist in bluetooth adapter.");
- check_method_exists(adapter, "destroyBonding");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("destroyBonding" in adapter, "Method destroyBonding does not exist in bluetooth adapter.");
+check_method_exists(adapter, "destroyBonding");
+ }
+ }, document.title);
</script>
</body>
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_successCallback_TypeMismatch
-//==== LABEL Check whether destroyBonding() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess, successCallback;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_successCallback_TypeMismatch\r
+//==== LABEL Check whether destroyBonding() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_successCallback_invalid_cb
-//==== LABEL Check if destroyBonding() method throws exception when invalid success callback is given
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- incorrectCallback, destroyBondingError, onBondingSuccess, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method destroyBonding shouldn't end successfully.");
- })
- };
-
- destroyBondingError = t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, destroyBondingError);
- }, "Given incorrect successCallback.");
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_successCallback_invalid_cb\r
+//==== LABEL Check if destroyBonding() method throws exception when invalid success callback is given\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ incorrectCallback, destroyBondingError, onBondingSuccess, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method destroyBonding shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ destroyBondingError = t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, destroyBondingError);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_with_errorCallback
-//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- successCallback = t.step_func(function () {
- t.done();
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_with_errorCallback\r
+//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ successCallback, errorCallback, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ successCallback = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_destroyBonding_with_successCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_destroyBonding_with_successCallback
-//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,
- onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- successCallback = t.step_func(function () {
- t.done();
- });
-
- onBondingSuccess = t.step_func(function () {
- adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_destroyBonding_with_successCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_destroyBonding_with_successCallback\r
+//==== LABEL Check with optional arguments destroyBonding(valid_address, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:destroyBonding M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,\r
+ onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ successCallback = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, successCallback);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
- }, "Given incorrect successCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, param[i], null);
+ }, "Given incorrect successCallback.");
+ }
}
}, document.title);
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, null, param[i]);
- }, "Given incorrect errorCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.destroyBonding(REMOTE_DEVICE_ADDRESS, null, param[i]);
+ }, "Given incorrect errorCallback.");
+ }
}
}, document.title);
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices
-//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}), stopDiscoverySuccess,
- discoverDevicesSuccessCB, retValue = null;
-
-t.step(function () {
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- if(devices.length > 0){
- assert_equals(retValue, undefined, "discoverDevices returns wrong value");
- t.done();
- }else{
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- stopDiscoverySuccess = t.step_func(function () {
- retValue = adapter.discoverDevices(discoverDevicesSuccessCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices\r
+//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}), stopDiscoverySuccess,\r
+ discoverDevicesSuccessCB, retValue = null;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ assert_equals(retValue, undefined, "discoverDevices returns wrong value");\r
+ t.done();\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ retValue = adapter.discoverDevices(discoverDevicesSuccessCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_callback_onerror
-//==== LABEL Check if error callback of discoverDevices method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB, errorCallback;
-t.step(function () {
-
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- assert_unreached("invalid onstarted invoked");
- }),
- ondevicefound: t.step_func(function (device) {
- assert_unreached("invalid ondevicefound invoked");
- }),
- ondevicedisappeared: t.step_func(function (address) {
- assert_unreached("invalid ondevicedisappeared invoked");
- }),
- onfinished: t.step_func(function (devices) {
- assert_unreached("invalid onfinished invoked");
- })
- };
-
- errorCallback = t.step_func(function (error) {
- assert_equals(error.name, "ServiceNotAvailableError", "expected another error");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.discoverDevices(discoverDevicesSuccessCB, errorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_callback_onerror\r
+//==== LABEL Check if error callback of discoverDevices method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB, errorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ assert_unreached("invalid onstarted invoked");\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ assert_unreached("invalid ondevicefound invoked");\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ assert_unreached("invalid ondevicedisappeared invoked");\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ assert_unreached("invalid onfinished invoked");\r
+ })\r
+ };\r
+\r
+ errorCallback = t.step_func(function (error) {\r
+ assert_equals(error.name, "ServiceNotAvailableError", "expected another error");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, errorCallback);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_callback_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_discoverDevices_callback_successful
-//==== LABEL Check if successful callback of discoverDevices method invoked
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCallback, stopDiscoverySuccess,
- discoverDevicesSuccessCallback;
-t.step(function () {
-
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- t.done();
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- })
- };
-
- discoverDevicesErrorCallback = t.step_func(function (e){
- assert_unreached("discoverDevicesErrorCallback" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function (){
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCallback);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setBluetoothDiscoveryCleanup(adapter);
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_callback_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_discoverDevices_callback_successful\r
+//==== LABEL Check if successful callback of discoverDevices method invoked\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCallback, stopDiscoverySuccess,\r
+ discoverDevicesSuccessCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ t.done();\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ discoverDevicesErrorCallback = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCallback" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCallback);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setBluetoothDiscoveryCleanup(adapter);\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch
-//==== LABEL Check whether discoverDevices() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- successCallback, errorCallback, stopDiscoverySuccess, conversionTable;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.discoverDevices(successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_TypeMismatch\r
+//==== LABEL Check whether discoverDevices() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ successCallback, errorCallback, stopDiscoverySuccess, conversionTable;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ successCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.discoverDevices(successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_invalid_cb
-//==== LABEL Check argument discoverDevices() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- successCallback, incorrectCallback, stopDiscoverySuccess;
-t.step(function () {
- successCallback =t.step_func( function () {
- assert_unreached("Method discoverDevices shouldn't end successfully.");
- });
-
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- stopDiscoverySuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.discoverDevices(successCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_errorCallback_invalid_cb\r
+//==== LABEL Check argument discoverDevices() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ successCallback, incorrectCallback, stopDiscoverySuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method discoverDevices shouldn't end successfully.");\r
+ });\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.discoverDevices(successCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("discoverDevices" in adapter, "Method discoverDevices does not exist in bluetooth adapter.");
- check_method_exists(adapter, "discoverDevices");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var adapter = tizen.bluetooth.getDefaultAdapter();
+ assert_true("discoverDevices" in adapter, "Method discoverDevices does not exist in bluetooth adapter.");
+ check_method_exists(adapter, "discoverDevices");
+ }
+ }, document.title);
</script>
</body>
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_discoverDevices_invalid_callback_name</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-
-//==== TEST: BluetoothAdapter_discoverDevices_invalid_callback_name
-//==== LABEL Check whether discoverDevices() method called with invalid successCallback throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter = tizen.bluetooth.getDefaultAdapter(), discoverDevicesSuccessCallback,
- stopDiscoverySuccessCB, stopDiscoverySuccess;
-t.step(function () {
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- discoverDevicesSuccessCallback = {
- invalid: t.step_func(function () {}),
- ondevicefound: t.step_func(function () {}),
- ondevicedisappeared: t.step_func(function () {}),
- onfinished: t.step_func(function () {})
- };
-
- stopDiscoverySuccess = t.step_func(function () {
- try {
- adapter.discoverDevices(discoverDevicesSuccessCallback);
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- } catch(e) {
- assert_unreached("exception shouldn't be thrown");
- }
- });
-
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-}, "BluetoothAdapter_discoverDevices_invalid_callback_name");
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_invalid_callback_name</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+\r
+//==== TEST: BluetoothAdapter_discoverDevices_invalid_callback_name\r
+//==== LABEL Check whether discoverDevices() method called with invalid successCallback throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({ timeout: 180000 });\r
+var t = async_test(document.title, { timeout: 180000 }), adapter = tizen.bluetooth.getDefaultAdapter(), discoverDevicesSuccessCallback,\r
+ stopDiscoverySuccessCB, stopDiscoverySuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ discoverDevicesSuccessCallback = {\r
+ invalid: t.step_func(function () { }),\r
+ ondevicefound: t.step_func(function () { }),\r
+ ondevicedisappeared: t.step_func(function () { }),\r
+ onfinished: t.step_func(function () { })\r
+ };\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ try {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback);\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ } catch (e) {\r
+ assert_unreached("exception shouldn't be thrown");\r
+ }\r
+\r
+ });\r
+\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+ } else {\r
+ t.done();\r
+ }\r
+}, "BluetoothAdapter_discoverDevices_invalid_callback_name");\r
+\r
+</script>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_missarg
-//==== LABEL Check discoverDevices with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess;
-t.step(function () {
-
- stopDiscoverySuccess = t.step_func(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.discoverDevices();
- }, "Method with non optional argument.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_missarg\r
+//==== LABEL Check discoverDevices with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ adapter.discoverDevices();\r
+ }, "Method with non optional argument.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfinish_successful</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfinish_successful
-//==== LABEL Check if onfinish method of successful callback of discoverDevices method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 300000});
-
-var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,
- discoverDevicesErrorCB;
-
-t.step(function () {
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: t.step_func(function (address) {
- }),
- onfinished: t.step_func(function (devices) {
- t.done();
- })
- };
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfinish_successful</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfinish_successful\r
+//==== LABEL Check if onfinish method of successful callback of discoverDevices method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 300000});\r
+\r
+var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,\r
+ discoverDevicesErrorCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ t.done();\r
+ })\r
+ };\r
+\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfound_deviceaddress</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfound_deviceaddress
-//==== LABEL Check if device address is found
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,
- discoverDevicesSuccessCallback;
-t.step(function () {
-
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- assert_not_equals(device.address, null, "device address in ondevicefound");
-
- t.done();
- }),
- ondevicedisappeared: t.step_func(function (address) {
-
- }),
- onfinished: t.step_func(function (devices) {
- if (devices.length === 0) {
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setBluetoothDiscoveryCleanup(adapter);
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfound_deviceaddress</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfound_deviceaddress\r
+//==== LABEL Check if device address is found\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,\r
+ discoverDevicesSuccessCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ assert_not_equals(device.address, null, "device address in ondevicefound");\r
+\r
+ t.done();\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length === 0) {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setBluetoothDiscoveryCleanup(adapter);\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfound_devicename</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfound_devicename
-//==== LABEL Check if device name is found
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,
- discoverDevicesSuccessCallback;
-t.step(function () {
-
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- assert_not_equals(device.name, null, "device name in ondevicefound");
-
- t.done();
- }),
- ondevicedisappeared: t.step_func(function (address) {
-
- }),
- onfinished: t.step_func(function (devices) {
- if (devices.length === 0) {
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setBluetoothDiscoveryCleanup(adapter);
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfound_devicename</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfound_devicename\r
+//==== LABEL Check if device name is found\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesError, stopDiscoverySuccess,\r
+ discoverDevicesSuccessCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ assert_not_equals(device.name, null, "device name in ondevicefound");\r
+\r
+ t.done();\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length === 0) {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setBluetoothDiscoveryCleanup(adapter);\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_onfound_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_onfound_successful
-//==== LABEL Check if onfound method of successful callback of discoverDevices method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,
- discoverDevicesError;
-t.step(function () {
-
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- check_bluetooth_device(device);
-
- t.done();
- }),
- ondevicedisappeared: t.step_func(function (address) {
-
- }),
- onfinished: t.step_func(function (devices) {
- if (devices.length === 0) {
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setBluetoothDiscoveryCleanup(adapter);
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_onfound_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_onfound_successful\r
+//==== LABEL Check if onfound method of successful callback of discoverDevices method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, stopDiscoverySuccess, discoverDevicesSuccessCallback,\r
+ discoverDevicesError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+\r
+ t.done();\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length === 0) {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setBluetoothDiscoveryCleanup(adapter);\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_successCallback_TypeMismatch
-//==== LABEL Check whether discoverDevices() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, stopDiscoverySuccess, successCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("object", false);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.discoverDevices(successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_successCallback_TypeMismatch\r
+//==== LABEL Check whether discoverDevices() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, stopDiscoverySuccess, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("object", false);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.discoverDevices(successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_successCallback_invalid_cb
-//==== LABEL Check discoverDevices() argument successCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- incorrectCallback, i, stopDiscoverySuccess, discoverDevicesError, exceptionName = "TypeMismatchError", incorrectListeners;
-t.step(function () {
- incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- for(i = 0; i < incorrectListeners.length; i++) {
- incorrectCallback = incorrectListeners[i][0];
- exceptionName = incorrectListeners[i][1];
- assert_throws({name: exceptionName},
- function () {
- adapter.discoverDevices(incorrectCallback, discoverDevicesError);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_successCallback_invalid_cb\r
+//==== LABEL Check discoverDevices() argument successCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ incorrectCallback, i, stopDiscoverySuccess, discoverDevicesError, exceptionName = "TypeMismatchError", incorrectListeners;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ for (i = 0; i < incorrectListeners.length; i++) {\r
+ incorrectCallback = incorrectListeners[i][0];\r
+ exceptionName = incorrectListeners[i][1];\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.discoverDevices(incorrectCallback, discoverDevicesError);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_discoverDevices_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_discoverDevices_with_errorCallback
-//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback, errorCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCB, stopDiscoverySuccess,
- discoverDevicesSuccessCB;
-t.step(function () {
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- if(devices.length > 0){
- t.done();
- }else{
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_discoverDevices_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_discoverDevices_with_errorCallback\r
+//==== LABEL Check with non-optional arguments discoverDevices(valid_successCallback, errorCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, discoverDevicesErrorCB, stopDiscoverySuccess,\r
+ discoverDevicesSuccessCB;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ t.done();\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBX
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- check_extensibility(adapter);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var adapter = tizen.bluetooth.getDefaultAdapter();
+ check_extensibility(adapter);
+ }
}, document.title);
</script>
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MR MNA
test(function () {
- var globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
- assert_type(globalBluetoothAdapter.setName, "function", "setName: ");
- assert_type(globalBluetoothAdapter.discoverDevices, "function", "discoverDevices: ");
- assert_type(globalBluetoothAdapter.stopDiscovery, "function", "stopDiscovery: ");
- assert_type(globalBluetoothAdapter.getKnownDevices, "function", "getKnownDevices: ");
- assert_type(globalBluetoothAdapter.getDevice, "function", "getDevice: ");
- assert_type(globalBluetoothAdapter.createBonding, "function", "createBonding: ");
- assert_type(globalBluetoothAdapter.destroyBonding, "function", "destroyBonding: ");
- assert_type(globalBluetoothAdapter.registerRFCOMMServiceByUUID, "function", "registerRFCOMMServiceByUUID: ");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+ assert_type(globalBluetoothAdapter.setName, "function", "setName: ");
+ assert_type(globalBluetoothAdapter.discoverDevices, "function", "discoverDevices: ");
+ assert_type(globalBluetoothAdapter.stopDiscovery, "function", "stopDiscovery: ");
+ assert_type(globalBluetoothAdapter.getKnownDevices, "function", "getKnownDevices: ");
+ assert_type(globalBluetoothAdapter.getDevice, "function", "getDevice: ");
+ assert_type(globalBluetoothAdapter.createBonding, "function", "createBonding: ");
+ assert_type(globalBluetoothAdapter.destroyBonding, "function", "destroyBonding: ");
+ assert_type(globalBluetoothAdapter.registerRFCOMMServiceByUUID, "function", "registerRFCOMMServiceByUUID: ");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_getDevice
-//==== LABEL Check with non-optional arguments getDevice(valid_address, valid_successCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- onBondingSuccess, onBondingError, powerOnSuccess, gotDeviceInfo, retValue = null;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- check_bluetooth_device(device);
- assert_equals(retValue, undefined, "Argument getDevice returns wrong value.");
- t.done();
- });
-
- onBondingSuccess = t.step_func(function () {
- retValue = adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_getDevice\r
+//==== LABEL Check with non-optional arguments getDevice(valid_address, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ onBondingSuccess, onBondingError, powerOnSuccess, gotDeviceInfo, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+ assert_equals(retValue, undefined, "Argument getDevice returns wrong value.");\r
+ t.done();\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ retValue = adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_callback_onerror
-//==== LABEL Check if error callback of getDevice method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, gotDeviceInfo, gotDeviceError;
-t.step(function () {
-
- gotDeviceInfo = t.step_func(function (device) {
- assert_unreached("Method getDevice shouldn't end successful.");
- });
-
- gotDeviceError = t.step_func(function (error) {
- assert_equals(error.name, "ServiceNotAvailableError", "Wrong value of error name in gotDeviceError.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_callback_onerror\r
+//==== LABEL Check if error callback of getDevice method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({ timeout: 180000 });\r
+var t = async_test(document.title, { timeout: 180000 }), adapter, powerOffSuccess, gotDeviceInfo, gotDeviceError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ assert_unreached("Method getDevice shouldn't end successful.");\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (error) {\r
+ assert_equals(error.name, "ServiceNotAvailableError", "Wrong value of error name in gotDeviceError.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_errorCallback_TypeMismatch
-//==== LABEL Check whether getDevice() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, successCallback, powerOnSuccess, errorCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("Method getDevice shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_errorCallback_TypeMismatch\r
+//==== LABEL Check whether getDevice() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, successCallback, powerOnSuccess, errorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method getDevice shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_errorCallback_invalid_cb
-//==== LABEL Check getDevice() argument errorCallback validation - use {onerror: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- incorrectCallback, getDeviceSuccess, powerOnSuccess;
-t.step(function () {
- incorrectCallback = {
- onerror: t.step_func(function (e) {
- assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
- })
- };
-
- getDeviceSuccess = t.step_func(function () {
- assert_unreached("Method getDevice shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, getDeviceSuccess, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_errorCallback_invalid_cb\r
+//==== LABEL Check getDevice() argument errorCallback validation - use {onerror: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ incorrectCallback, getDeviceSuccess, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (e) {\r
+ assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+ })\r
+ };\r
+\r
+ getDeviceSuccess = t.step_func(function () {\r
+ assert_unreached("Method getDevice shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, getDeviceSuccess, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lei, ZhanX <zhanx.lei@intel.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("getDevice" in adapter, "Method getDevice does not exist in bluetooth adapter.");
- check_method_exists(adapter, "getDevice");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("getDevice" in adapter, "Method getDevice does not exist in bluetooth adapter.");
+check_method_exists(adapter, "getDevice");
+ }
+ }, document.title);
</script>
</body>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_missarg
-//==== LABEL Check getDevice with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function () {
-
- powerOnSuccess = t.step_func(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.getDevice();
- }, "Method with non optional argument.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_missarg\r
+//==== LABEL Check getDevice with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ adapter.getDevice();\r
+ }, "Method with non optional argument.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_successCallback_TypeMismatch
-//==== LABEL Check whether getDevice() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, powerOnSuccess, successCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", false);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_successCallback_TypeMismatch\r
+//==== LABEL Check whether getDevice() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getDevice_successCallback_invalid_cb
-//==== LABEL Check if successful callback of getDevice() method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- incorrectCallback, getDeviceError, powerOnSuccess;
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method getDevice shouldn't end successfully.");
- })
- };
-
- getDeviceError = t.step_func(function (e) {
- assert_unreached("getDeviceError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, incorrectCallback, getDeviceError);
- }, "Given incorrect successCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getDevice_successCallback_invalid_cb\r
+//==== LABEL Check if successful callback of getDevice() method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ incorrectCallback, getDeviceError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method getDevice shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ getDeviceError = t.step_func(function (e) {\r
+ assert_unreached("getDeviceError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, incorrectCallback, getDeviceError);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_getDevice_with_errorCallback</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script type="text/javascript">
-//==== TEST: BluetoothAdapter_getDevice_with_errorCallback
-//==== LABEL Check with optional arguments getDevice(valid_address, valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- check_bluetooth_device(device);
- t.done();
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getDevice_with_errorCallback</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script type="text/javascript">\r
+//==== TEST: BluetoothAdapter_getDevice_with_errorCallback\r
+//==== LABEL Check with optional arguments getDevice(valid_address, valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+ t.done();\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.getDevice(REMOTE_DEVICE_ADDRESS, param[i], null);
- }, "Given incorrect successCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.getDevice(REMOTE_DEVICE_ADDRESS, param[i], null);
+ }, "Given incorrect successCallback.");
+ }
}
}, document.title);
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_getKnownDevices</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices
-//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, testDeviceSuccessCB, discoverSuccess, discoverError,
- stopDiscoverySuccess, retValue = null;
-t.step(function () {
-
- testDeviceSuccessCB = t.step_func(function (devices) {
- check_bluetooth_device_array(devices);
- check_bluetooth_device(devices[0]);
- assert_equals(retValue, undefined, "Method getKnownDevices returns wrong value.");
-
- t.done();
- });
-
- discoverSuccess = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- if(devices.length > 0){
- check_bluetooth_device_array(devices);
- retValue = adapter.getKnownDevices(testDeviceSuccessCB);
- }else{
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverError = t.step_func(function (e) {
- assert_unreached("discoverError exception:" + e.message);
- });
-
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverSuccess, discoverError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices\r
+//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, testDeviceSuccessCB, discoverSuccess, discoverError,\r
+ stopDiscoverySuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ testDeviceSuccessCB = t.step_func(function (devices) {\r
+ check_bluetooth_device_array(devices);\r
+ check_bluetooth_device(devices[0]);\r
+ assert_equals(retValue, undefined, "Method getKnownDevices returns wrong value.");\r
+\r
+ t.done();\r
+ });\r
+\r
+ discoverSuccess = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ check_bluetooth_device_array(devices);\r
+ retValue = adapter.getKnownDevices(testDeviceSuccessCB);\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverError = t.step_func(function (e) {\r
+ assert_unreached("discoverError exception:" + e.message);\r
+ });\r
+\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverSuccess, discoverError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_callback_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_callback_onerror
-//==== LABEL Check if error callback of getKnownDevices method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, getKnownDevicesSuccess, getKnownDevicesError;
-t.step(function () {
-
- getKnownDevicesSuccess = t.step_func(function (devices) {
- assert_unreached("Method getKnownDevices shouldn't end successful.");
- });
-
- getKnownDevicesError = t.step_func(function (e) {
- assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in getKnownDevicesError.");
- t.done();
- });
-
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_callback_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_callback_onerror\r
+//==== LABEL Check if error callback of getKnownDevices method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, getKnownDevicesSuccess, getKnownDevicesError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+getKnownDevicesSuccess = t.step_func(function (devices) {\r
+ assert_unreached("Method getKnownDevices shouldn't end successful.");\r
+});\r
+\r
+getKnownDevicesError = t.step_func(function (e) {\r
+ assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in getKnownDevicesError.");\r
+ t.done();\r
+});\r
+\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_callback_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_callback_successful
-//==== LABEL Check if successful callback of getKnownDevices method invoked
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, getKnownDevicesSuccess, getKnownDevicesError;
-t.step(function () {
-
- getKnownDevicesSuccess = t.step_func(function (devices) {
- t.done();
- });
-
- getKnownDevicesError = t.step_func(function (e) {
- assert_unreached("getKnownDevicesError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_callback_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_callback_successful\r
+//==== LABEL Check if successful callback of getKnownDevices method invoked\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, getKnownDevicesSuccess, getKnownDevicesError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+getKnownDevicesSuccess = t.step_func(function (devices) {\r
+ t.done();\r
+});\r
+\r
+getKnownDevicesError = t.step_func(function (e) {\r
+ assert_unreached("getKnownDevicesError exception:" + e.message);\r
+});\r
+\r
+powerOnSuccess = t.step_func(function () {\r
+ adapter.getKnownDevices(getKnownDevicesSuccess, getKnownDevicesError);\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_check_types</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_check_types
-//==== LABEL Check whether all known Bluetooth devices are listed properly (part 2)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA
-
-setup({timeout: 300000});
-
-var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverSuccess, discoverError,
- i, testDeviceSuccessCB, testMultipleDevicesSuccessCB;
-
-t.step(function () {
- testDeviceSuccessCB = t.step_func(function (device) {
- assert_type(device.name, "string", "Device name type check:");
- assert_type(device.address, "string", "Device address type check:");
- assert_type(device.deviceClass, "object", "Device deviceClass type check:");
- assert_type(device.isBonded, "boolean", "Device isBonded type check:");
- assert_type(device.isTrusted, "boolean", "Device isTrusted type check:");
- assert_type(device.isConnected, "boolean", "Device isConnected type check:");
- assert_type(device.deviceClass.major, "octet", "Device deviceClass.major type check:");
- assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");
- assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");
- assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");
- assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");
- t.done();
- });
-
- testMultipleDevicesSuccessCB = t.step_func(function (devices) {
- assert_not_equals(devices.length, 0, "No devices was found");
- for (i = 0; i < devices.length; i++) {
- testDeviceSuccessCB(devices[i]);
- }
- });
-
- discoverSuccess = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- if(devices.length > 0){
- adapter.getKnownDevices(testMultipleDevicesSuccessCB);
- }else{
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverError = t.step_func(function (e) {
- assert_unreached("discoverError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverSuccess, discoverError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_check_types</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_check_types\r
+//==== LABEL Check whether all known Bluetooth devices are listed properly (part 2)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA\r
+\r
+setup({timeout: 300000});\r
+\r
+var t = async_test(document.title, {timeout: 300000}), adapter, stopDiscoverySuccess, discoverSuccess, discoverError,\r
+ i, testDeviceSuccessCB, testMultipleDevicesSuccessCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ testDeviceSuccessCB = t.step_func(function (device) {\r
+ assert_type(device.name, "string", "Device name type check:");\r
+ assert_type(device.address, "string", "Device address type check:");\r
+ assert_type(device.deviceClass, "object", "Device deviceClass type check:");\r
+ assert_type(device.isBonded, "boolean", "Device isBonded type check:");\r
+ assert_type(device.isTrusted, "boolean", "Device isTrusted type check:");\r
+ assert_type(device.isConnected, "boolean", "Device isConnected type check:");\r
+ assert_type(device.deviceClass.major, "octet", "Device deviceClass.major type check:");\r
+ assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");\r
+ assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");\r
+ assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");\r
+ assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");\r
+ t.done();\r
+ });\r
+\r
+ testMultipleDevicesSuccessCB = t.step_func(function (devices) {\r
+ assert_not_equals(devices.length, 0, "No devices was found");\r
+ for (i = 0; i < devices.length; i++) {\r
+ testDeviceSuccessCB(devices[i]);\r
+ }\r
+ });\r
+\r
+ discoverSuccess = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ adapter.getKnownDevices(testMultipleDevicesSuccessCB);\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverError = t.step_func(function (e) {\r
+ assert_unreached("discoverError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverSuccess, discoverError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch
-//==== LABEL Check whether getKnownDevices() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, successCallback, powerOnSuccess, errorCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("successCallback shouldn't be call");
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.getKnownDevices(successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch\r
+//==== LABEL Check whether getKnownDevices() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, successCallback, powerOnSuccess, errorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("successCallback shouldn't be call");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getKnownDevices(successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb
-//==== LABEL Check getKnownDevices() argument errorCallback validation - use {onerror: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- incorrectCallback, getKnownDevicesSuccess, powerOnSuccess;
-t.step(function () {
- incorrectCallback = {
- onerror: t.step_func(function (e) {
- assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
- })
- };
-
- getKnownDevicesSuccess = t.step_func(function () {
- assert_unreached("Method getKnownDevices shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.getKnownDevices(getKnownDevicesSuccess, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb\r
+//==== LABEL Check getKnownDevices() argument errorCallback validation - use {onerror: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ incorrectCallback, getKnownDevicesSuccess, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (e) {\r
+ assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+ })\r
+ };\r
+\r
+ getKnownDevicesSuccess = t.step_func(function () {\r
+ assert_unreached("Method getKnownDevices shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getKnownDevices(getKnownDevicesSuccess, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("getKnownDevices" in adapter, "Method getKnownDevices does not exist in bluetooth adapter.");
- check_method_exists(adapter, "getKnownDevices");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("getKnownDevices" in adapter, "Method getKnownDevices does not exist in bluetooth adapter.");
+check_method_exists(adapter, "getKnownDevices");
+ }
+ }, document.title);
</script>
</body>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_missarg
-//==== LABEL Check getKnownDevices with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function () {
-
- powerOnSuccess = t.step_func(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.getKnownDevices();
- }, "Method with non optional argument.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_missarg\r
+//==== LABEL Check getKnownDevices with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ adapter.getKnownDevices();\r
+ }, "Method with non optional argument.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch
-//==== LABEL Check whether getKnownDevices() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, powerOnSuccess, successCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", false);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.getKnownDevices(successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_TypeMismatch\r
+//==== LABEL Check whether getKnownDevices() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getKnownDevices(successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_getKnownDevices_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_invalid_cb
-//==== LABEL Check getKnownDevices() argument successCallback validation - use {onsuccess: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- incorrectCallback, getKnownDevicesError, powerOnSuccess, exceptionName = "TypeMismatchError";
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method getKnownDevices shouldn't end successfully.");
- })
- };
-
- getKnownDevicesError = t.step_func(function (e) {
- assert_unreached("getKnownDevicesError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.getKnownDevices(incorrectCallback, getKnownDevicesError);
- }, "Given incorrect successCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_successCallback_invalid_cb\r
+//==== LABEL Check getKnownDevices() argument successCallback validation - use {onsuccess: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ incorrectCallback, getKnownDevicesError, powerOnSuccess, exceptionName = "TypeMismatchError";\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method getKnownDevices shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ getKnownDevicesError = t.step_func(function (e) {\r
+ assert_unreached("getKnownDevicesError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.getKnownDevices(incorrectCallback, getKnownDevicesError);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.getKnownDevices(param[i], null);
- }, "Given incorrect successCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.getKnownDevices(param[i], null);
+ }, "Given incorrect successCallback.");
+ }
}
}, document.title);
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_getKnownDevices_with_errorCallback</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_getKnownDevices_with_errorCallback
-//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback, valid_errorCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA
-
-setup({timeout: 300000});
-
-var t = async_test(document.title, {timeout: 300000}), adapter, getKnownDevicesErrorCB, testDeviceSuccessCB,
- testMultipleDevicesSuccessCB, discoverSuccess, discoverError, stopDiscoverySuccess;
-
-t.step(function () {
- getKnownDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("onError exception:" + e.message);
- });
-
- testDeviceSuccessCB = t.step_func(function (device) {
- check_bluetooth_device(device);
- t.done();
- });
-
- testMultipleDevicesSuccessCB = t.step_func(function (devices) {
- testDeviceSuccessCB(devices[0]);
- });
-
- discoverSuccess = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- if (devices.length > 0){
- adapter.getKnownDevices(testMultipleDevicesSuccessCB, getKnownDevicesErrorCB);
- }else{
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverError = t.step_func(function (e) {
- assert_unreached("discoverError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverSuccess, discoverError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_getKnownDevices_with_errorCallback</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_getKnownDevices_with_errorCallback\r
+//==== LABEL Check with optional arguments getKnownDevices(valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA\r
+\r
+setup({timeout: 300000});\r
+\r
+var t = async_test(document.title, {timeout: 300000}), adapter, getKnownDevicesErrorCB, testDeviceSuccessCB,\r
+ testMultipleDevicesSuccessCB, discoverSuccess, discoverError, stopDiscoverySuccess;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ getKnownDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("onError exception:" + e.message);\r
+ });\r
+\r
+ testDeviceSuccessCB = t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+ t.done();\r
+ });\r
+\r
+ testMultipleDevicesSuccessCB = t.step_func(function (devices) {\r
+ testDeviceSuccessCB(devices[0]);\r
+ });\r
+\r
+ discoverSuccess = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ adapter.getKnownDevices(testMultipleDevicesSuccessCB, getKnownDevicesErrorCB);\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverError = t.step_func(function (e) {\r
+ assert_unreached("discoverError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverSuccess, discoverError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== TEST_CRITERIA AE AT ARO
var adapter = null;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- check_readonly(adapter, "name", adapter.name, "string", REMOTE_DEVICE_NAME + "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+adapter = tizen.bluetooth.getDefaultAdapter();
+check_readonly(adapter, "name", adapter.name, "string", REMOTE_DEVICE_NAME + "Tizen");
+ }
+ }, document.title);
</script>
</body>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothAdapter");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothAdapter");
+ }
}, document.title);
</script>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== TEST_CRITERIA AE AT ARO
var adapter = null;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- check_readonly(adapter, "powered", adapter.powered, "boolean", !(adapter.powered));
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+adapter = tizen.bluetooth.getDefaultAdapter();
+check_readonly(adapter, "powered", adapter.powered, "boolean", !(adapter.powered));
+ }
+ }, document.title);
</script>
</body>
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID
-//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,
- powerOnSuccess, retValue = null;
-t.step(function () {
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- assert_true("uuid" in handler, "No uuid in recordHandler.");
- assert_true("name" in handler, "No name in recordHandler.");
- assert_true("isConnected" in handler, "No isConnected in recordHandler.");
- assert_true("onconnect" in handler, "No onconnect in recordHandler.");
- assert_type(handler.unregister, "function", "Method unregister does not exist.");
- assert_equals(retValue, undefined, "Method registerRFCOMMServiceByUUID returns wrong value.");
- handler.unregister();
- t.done();
- });
-
- powerOnSuccess = t.step_func(function () {
- retValue = adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID\r
+//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,\r
+ powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ assert_true("uuid" in handler, "No uuid in recordHandler.");\r
+ assert_true("name" in handler, "No name in recordHandler.");\r
+ assert_true("isConnected" in handler, "No isConnected in recordHandler.");\r
+ assert_true("onconnect" in handler, "No onconnect in recordHandler.");\r
+ assert_type(handler.unregister, "function", "Method unregister does not exist.");\r
+ assert_equals(retValue, undefined, "Method registerRFCOMMServiceByUUID returns wrong value.");\r
+ handler.unregister();\r
+ t.done();\r
+});\r
+\r
+powerOnSuccess = t.step_func(function () {\r
+ retValue = adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess);\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch
-//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, successCallback, powerOnSuccess, exceptionName, errorCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_TypeMismatch\r
+//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, successCallback, powerOnSuccess, exceptionName, errorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb
-//==== LABEL Check argument registerRFCOMMServiceByUUID() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- incorrectCallback, registerRFCOMMServiceByUUIDSuccess, powerOnSuccess, exceptionName = "TypeMismatchError";
-t.step(function () {
- incorrectCallback = {
- onerror: t.step_func(function (e) {
- assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
- })
- };
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function () {
- assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb\r
+//==== LABEL Check argument registerRFCOMMServiceByUUID() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ incorrectCallback, registerRFCOMMServiceByUUIDSuccess, powerOnSuccess, exceptionName = "TypeMismatchError";\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (e) {\r
+ assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);\r
+ })\r
+ };\r
+\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function () {\r
+ assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("registerRFCOMMServiceByUUID" in adapter, "Method registerRFCOMMServiceByUUID does not exist in bluetooth adapter.");
- check_method_exists(adapter, "registerRFCOMMServiceByUUID");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("registerRFCOMMServiceByUUID" in adapter, "Method registerRFCOMMServiceByUUID does not exist in bluetooth adapter.");
+check_method_exists(adapter, "registerRFCOMMServiceByUUID");
+ }
+ }, document.title);
</script>
</body>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_missarg
-//==== LABEL Check registerRFCOMMServiceByUUID with missing non-optional argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;
-t.step(function () {
-
- powerOnSuccess = t.step_func(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.registerRFCOMMServiceByUUID();
- }, "Method with non optional argument.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_missarg\r
+//==== LABEL Check registerRFCOMMServiceByUUID with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ adapter.registerRFCOMMServiceByUUID();\r
+ }, "Method with non optional argument.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<ul id="testdetails" style="display:none;">
- <li>1. Push "Search" button on the remote device.</li>
- <li>2. Select this device among found devices after discovering is finished.</li>
- <li>3. Push "Connect to service" button on the remote device.</li>
-</ul>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful
-//==== LABEL Check whether a service record is registered and onconnect is called
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== STEP Push [Search] button on the remote device after description is appeared..
-//==== EXPECT The test device is found by the remote device.
-//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.
-//==== EXPECT onconnect is called.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE tct-bt-helper MUST be launched on the remote device.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, visibleSuccess, visibleError;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- handler.onconnect = t.step_func(function (socket) {
- t.done();
- });
- document.getElementById("testdetails").style["display"] = "";
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<ul id="testdetails" style="display:none;">\r
+ <li>1. Push "Search" button on the remote device.</li>\r
+ <li>2. Select this device among found devices after discovering is finished.</li>\r
+ <li>3. Push "Connect to service" button on the remote device.</li>\r
+</ul>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful\r
+//==== LABEL Check whether a service record is registered and onconnect is called\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP Push [Search] button on the remote device after description is appeared..\r
+//==== EXPECT The test device is found by the remote device.\r
+//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.\r
+//==== EXPECT onconnect is called.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE tct-bt-helper MUST be launched on the remote device.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, visibleSuccess, visibleError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ handler.onconnect = t.step_func(function (socket) {\r
+ t.done();\r
+ });\r
+ document.getElementById("testdetails").style["display"] = "";\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onerror
-//==== LABEL Check if error callback of registerRFCOMMServiceByUUID method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}),
- adapter, powerOffSuccess, chatServiceSuccessCallback, chatServiceErrorCallback;
-
-t.step(function () {
-
- chatServiceSuccessCallback = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successful.");
- });
-
- chatServiceErrorCallback = t.step_func(function (e) {
- assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in chatServiceErrorCallback.");
- t.done();
- done();
- });
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_onerror\r
+//==== LABEL Check if error callback of registerRFCOMMServiceByUUID method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}),\r
+ adapter, powerOffSuccess, chatServiceSuccessCallback, chatServiceErrorCallback;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+chatServiceSuccessCallback = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successful.");\r
+});\r
+\r
+chatServiceErrorCallback = t.step_func(function (e) {\r
+ assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in chatServiceErrorCallback.");\r
+ t.done();\r
+ done();\r
+});\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch
-//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, successCallback, errorCallback, powerOnSuccess;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", false);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch\r
+//==== LABEL Check whether registerRFCOMMServiceByUUID() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, successCallback, errorCallback, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb
-//==== LABEL Check argument registerRFCOMMServiceByUUID() successCallback validation - use {onsuccess: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- incorrectCallback, registerRFCOMMServiceByUUIDError, powerOnSuccess, exceptionName = "TypeMismatchError";
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
- })
- };
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", incorrectCallback, registerRFCOMMServiceByUUIDError);
- }, "Given incorrect successCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb\r
+//==== LABEL Check argument registerRFCOMMServiceByUUID() successCallback validation - use {onsuccess: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ incorrectCallback, registerRFCOMMServiceByUUIDError, powerOnSuccess, exceptionName = "TypeMismatchError";\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", incorrectCallback, registerRFCOMMServiceByUUIDError);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback
-//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
- setBluetoothHandlerCleanup(recordHandler);
- assert_true("uuid" in recordHandler, "No uuid in recordHandler.");
- assert_true("name" in recordHandler, "No name in recordHandler.");
- assert_true("isConnected" in recordHandler, "No isConnected in recordHandler.");
- assert_true("onconnect" in recordHandler, "No onconnect in recordHandler.");
- assert_type(recordHandler.unregister, "function", "Method unregister does not exist.");
-
- t.done();
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_with_errorCallback\r
+//==== LABEL Check with optional arguments registerRFCOMMServiceByUUID(valid_uuid, valid_name, valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+ setBluetoothHandlerCleanup(recordHandler);\r
+ assert_true("uuid" in recordHandler, "No uuid in recordHandler.");\r
+ assert_true("name" in recordHandler, "No name in recordHandler.");\r
+ assert_true("isConnected" in recordHandler, "No isConnected in recordHandler.");\r
+ assert_true("onconnect" in recordHandler, "No onconnect in recordHandler.");\r
+ assert_type(recordHandler.unregister, "function", "Method unregister does not exist.");\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", {}, [], [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "name", param[i], null);
- }, "Given incorrect successCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [null, undefined, 1, "aaa", {}, [], [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter();
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "name", param[i], null);
+ }, "Given incorrect successCallback.");
+ }
}
}, document.title);
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setChangeListener</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setChangeListener
-//==== LABEL Check with non-optional arguments setChangeListener(valid_listener)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the test device MUST be turned on.
-//==== STEP Turn off Bluetooth after run.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter, listener, retValue, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
- listener = {
- onstatechanged: t.step_func(function (powered) {
- assert_type(powered, "boolean", "Argument powered has wrong type.");
- adapter.unsetChangeListener();
- t.done();
- }),
- onnamechanged: t.step_func(function (name) {
- }),
- onvisibilitychanged: t.step_func(function (visible) {
- })
- };
- adapter = tizen.bluetooth.getDefaultAdapter();
- retValue = adapter.setChangeListener(listener);
- assert_equals(retValue, undefined, "Method setChangeListener did not return undefined.");
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setChangeListener</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setChangeListener\r
+//==== LABEL Check with non-optional arguments setChangeListener(valid_listener)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the test device MUST be turned on.\r
+//==== STEP Turn off Bluetooth after run.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, listener, retValue, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ listener = {\r
+ onstatechanged: t.step_func(function (powered) {\r
+ assert_type(powered, "boolean", "Argument powered has wrong type.");\r
+ adapter.unsetChangeListener();\r
+ t.done();\r
+ }),\r
+ onnamechanged: t.step_func(function (name) {\r
+ }),\r
+ onvisibilitychanged: t.step_func(function (visible) {\r
+ })\r
+ };\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ retValue = adapter.setChangeListener(listener);\r
+ assert_equals(retValue, undefined, "Method setChangeListener did not return undefined.");\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
var adapter;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("setChangeListener" in adapter, "Method setChangeListener does not exist in bluetooth adapter.");
- check_method_exists(adapter, "setChangeListener");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ assert_true("setChangeListener" in adapter, "Method setChangeListener does not exist in bluetooth adapter.");
+ check_method_exists(adapter, "setChangeListener");
+ }
}, document.title);
</script>
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
var adapter, listener, exceptionName, i, conversionTable = getTypeConversionExceptions("object", false);
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- for(i = 0; i < conversionTable.length; i++) {
- listener = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.setChangeListener(listener);
- }, "Given incorrect listener.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ for (i = 0; i < conversionTable.length; i++) {
+ listener = conversionTable[i][0];
+ exceptionName = conversionTable[i][1];
+
+ assert_throws({ name: exceptionName },
+ function () {
+ adapter.setChangeListener(listener);
+ }, "Given incorrect listener.");
+ }
}
}, document.title);
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
var adapter, incorrectListeners, incorrectListener, i, exceptionName;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- incorrectListeners = getListenerConversionExceptions(["onstatechanged", "onnamechanged", "onvisibilitychanged"]);
- for(i = 0; i < incorrectListeners.length; i++) {
- incorrectListener = incorrectListeners[i][0];
- exceptionName = incorrectListeners[i][1];
- assert_throws({name: exceptionName},
- function () {
- adapter.setChangeListener(incorrectListener);
- }, "Given incorrect listener.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ incorrectListeners = getListenerConversionExceptions(["onstatechanged", "onnamechanged", "onvisibilitychanged"]);
+ for (i = 0; i < incorrectListeners.length; i++) {
+ incorrectListener = incorrectListeners[i][0];
+ exceptionName = incorrectListeners[i][1];
+ assert_throws({ name: exceptionName },
+ function () {
+ adapter.setChangeListener(incorrectListener);
+ }, "Given incorrect listener.");
+ }
}
}, document.title);
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
var adapter;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.setChangeListener();
- }, "Method with non optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ assert_throws({ name: "TypeMismatchError" },
+ function () {
+ adapter.setChangeListener();
+ }, "Method with non optional argument.");
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName
-//==== LABEL Check with non-optional arguments setName(valid_name)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess, retValue = null;
-t.step(function () {
-
- powerOnSuccess = t.step_func(function () {
- retValue = adapter.setName("myBluetooth");
- assert_equals(retValue, undefined, "Method setName returns wrong value.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName\r
+//==== LABEL Check with non-optional arguments setName(valid_name)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ powerOnSuccess = t.step_func(function () {\r
+ retValue = adapter.setName("myBluetooth");\r
+ assert_equals(retValue, undefined, "Method setName returns wrong value.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_callback_error</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_callback_error
-//==== LABEL Check if error callback of setName method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, setNameSuccess, setNameError;
-t.step(function () {
-
- setNameSuccess = t.step_func(function () {
- assert_unreached("Method setName shouldn't end successful.");
- });
-
- setNameError = t.step_func(function (e) {
- assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in setNameError.");
- t.done();
- });
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.setName("myBluetooth", setNameSuccess, setNameError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+ \r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_callback_error</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_callback_error\r
+//==== LABEL Check if error callback of setName method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOffSuccess, setNameSuccess, setNameError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+setNameSuccess = t.step_func(function () {\r
+ assert_unreached("Method setName shouldn't end successful.");\r
+});\r
+\r
+setNameError = t.step_func(function (e) {\r
+ assert_equals(e.name, "ServiceNotAvailableError", "Wrong value of error name in setNameError.");\r
+ t.done();\r
+});\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+adapter.setName("myBluetooth", setNameSuccess, setNameError);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_errorCallback_TypeMismatch
-//==== LABEL Check whether setName() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- powerOnSuccess, errorCallback, successCallback, errorCallback, conversionTable;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("Method setName shouldn't end successfully.");
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.setName("myBluetooth", successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_errorCallback_TypeMismatch\r
+//==== LABEL Check whether setName() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ powerOnSuccess, errorCallback, successCallback, errorCallback, conversionTable;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method setName shouldn't end successfully.");\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.setName("myBluetooth", successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->-->
-<html>
-<head>
-<title>BluetoothAdapter_setName_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_errorCallback_invalid_cb
-//==== LABEL Check argument setName() errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- powerOnSuccess, incorrectCallback, successCallback;
-t.step(function () {
- successCallback =t.step_func( function () {
- assert_unreached("Method setName shouldn't end successfully.");
- });
-
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.setName("myBluetooth", successCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_errorCallback_invalid_cb\r
+//==== LABEL Check argument setName() errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ powerOnSuccess, incorrectCallback, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method setName shouldn't end successfully.");\r
+ });\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.setName("myBluetooth", successCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("setName" in adapter, "Method setName does not exist in bluetooth adapter.");
- check_method_exists(adapter, "setName");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("setName" in adapter, "Method setName does not exist in bluetooth adapter.");
+check_method_exists(adapter, "setName");
+ }
+ }, document.title);
</script>
</body>
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_longname</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_longname
-//==== LABEL Check if long name is set
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE Please wait at least 5 second before run test
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, longname = "mybluetooth", setNameSuccess,
- setNameError, i;
-t.step(function () {
-
- setNameSuccess = t.step_func(function () {
- assert_equals(adapter.name, longname, "Wrong value of attribute name in BluetoothAdapter.");
- t.done();
- });
-
- setNameError = t.step_func(function (e) {
- assert_unreached("setNameError exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < 12; i ++) {
- longname = longname + "0123456789";
- }
- adapter.setName(longname, setNameSuccess, setNameError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_longname</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_longname\r
+//==== LABEL Check if long name is set\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE Please wait at least 5 second before run test\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, longname = "mybluetooth", setNameSuccess,\r
+ setNameError, i;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+\r
+setNameSuccess = t.step_func(function () {\r
+ assert_equals(adapter.name, longname, "Wrong value of attribute name in BluetoothAdapter.");\r
+ t.done();\r
+});\r
+\r
+setNameError = t.step_func(function (e) {\r
+ assert_unreached("setNameError exception " + e.message);\r
+});\r
+\r
+powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < 12; i++) {\r
+ longname = longname + "0123456789";\r
+ }\r
+ adapter.setName(longname, setNameSuccess, setNameError);\r
+});\r
+\r
+adapter = tizen.bluetooth.getDefaultAdapter();\r
+setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+t.done();\r
+ }\r
+ });\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_successCallback_TypeMismatch
-//==== LABEL Check whether setName() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- powerOnSuccess, errorCallback, conversionTable, exceptionName, successCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.setName("myBluetooth", successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_successCallback_TypeMismatch\r
+//==== LABEL Check whether setName() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ powerOnSuccess, errorCallback, conversionTable, exceptionName, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.setName("myBluetooth", successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_successCallback_invalid_cb
-//==== LABEL Check argument setName() successCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",
- powerOnSuccess, setNameError, incorrectCallback;
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method setName shouldn't end successfully.");
- })
- };
-
- setNameError = t.step_func(function (e) {
- assert_unreached("setNameError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.setName("myBluetooth", incorrectCallback, setNameError);
- }, "Given incorrect successCallback.");
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_successCallback_invalid_cb\r
+//==== LABEL Check argument setName() successCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName = "TypeMismatchError",\r
+ powerOnSuccess, setNameError, incorrectCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method setName shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ setNameError = t.step_func(function (e) {\r
+ assert_unreached("setNameError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ adapter.setName("myBluetooth", incorrectCallback, setNameError);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothAdapter_setName_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_with_errorCallback
-//==== LABEL Check if name attribute of adapter set
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE Please wait at least 5 second before run test
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- setNameSuccess, setNameError, powerOnSuccess;
-
-setNameSuccess = t.step_func(function () {
- assert_equals(adapter.name, "myBluetooth_with_Error", "Method setName did not set name attribute.");
- t.done();
-});
-
-setNameError = t.step_func(function (e) {
- assert_unreached("setNameError exception:" + e.message);
-});
-
-powerOnSuccess = t.step_func(function () {
- adapter.setName("myBluetooth_with_Error", setNameSuccess, setNameError);
-});
-
-adapter = tizen.bluetooth.getDefaultAdapter();
-setPowered(t, adapter, powerOnSuccess);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_setName_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_with_errorCallback\r
+//==== LABEL Check if name attribute of adapter set\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE Please wait at least 5 second before run test\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({ timeout: 180000 });\r
+\r
+var adapter = null, t = async_test(document.title, { timeout: 180000 }),\r
+ setNameSuccess, setNameError, powerOnSuccess;\r
+\r
+t.step(function () {\r
+if (BT_SUPPORT) { // network.bluetooth support\r
+ setNameSuccess = t.step_func(function () {\r
+ assert_equals(adapter.name, "myBluetooth_with_Error", "Method setName did not set name attribute.");\r
+ t.done();\r
+ });\r
+\r
+ setNameError = t.step_func(function (e) {\r
+ assert_unreached("setNameError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.setName("myBluetooth_with_Error", setNameSuccess, setNameError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+} else {\r
+ t.done();\r
+}\r
+ });\r
+</script>\r
+</body>\r
+\r
+</html>
\ No newline at end of file
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_setName_with_successCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_setName_with_successCallback
-//==== LABEL Check with optional arguments setName(valid_name, successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- setNameSuccessCB, powerOnSuccess, newName = "myBluetooth_with_Success";
-t.step(function () {
-
- setNameSuccessCB = t.step_func(function () {
- assert_equals(adapter.name, newName, "Method setName did not set name attribute.");
- t.done();
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.setName(newName, setNameSuccessCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_setName_with_successCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_setName_with_successCallback\r
+//==== LABEL Check with optional arguments setName(valid_name, successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ setNameSuccessCB, powerOnSuccess, newName = "myBluetooth_with_Success";\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ setNameSuccessCB = t.step_func(function () {\r
+ assert_equals(adapter.name, newName, "Method setName did not set name attribute.");\r
+ t.done();\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.setName(newName, setNameSuccessCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var param = [1, "aaa", [1, 2, 3], {}], i,
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.setName("aa", param[i], null);
- }, "Given incorrect successCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var param = [1, "aaa", [1, 2, 3], {}], i,
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.setName("aa", param[i], null);
+ }, "Given incorrect successCallback.");
+ }
}
}, document.title);
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MC
test(function () {
- var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
- globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
-
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- globalBluetoothAdapter.setName("aa", null, param[i]);
- }, "Given incorrect errorCallback.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var globalBluetoothAdapter, param = [1, "aaa", [1, 2, 3], {}], i;
+ globalBluetoothAdapter = tizen.bluetooth.getDefaultAdapter(1);
+
+ for (i = 0; i < param.length; i++) {
+ assert_throws(TYPE_MISMATCH_EXCEPTION,
+ function () {
+ globalBluetoothAdapter.setName("aa", null, param[i]);
+ }, "Given incorrect errorCallback.");
+ }
}
}, document.title);
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery
-//==== LABEL Check with optional arguments stopDiscovery
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-setup({timeout:180000, explicit_done:true});
-var adapter, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB,
- testBluetoothErrorCB, stopDiscoverySuccess, retValue = null;
-t.step(function () {
-
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- retValue = adapter.stopDiscovery();
- assert_equals(retValue, undefined, "stopDiscovery returns wrong value");
- t.done();
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- })
- };
-
- testBluetoothErrorCB = t.step_func(function (e) {
- assert_unreached("testBluetoothErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setBluetoothDiscoveryCleanup(adapter);
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery\r
+//==== LABEL Check with optional arguments stopDiscovery\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter, t = async_test(document.title, {timeout: 180000}), discoverDevicesSuccessCB,\r
+ testBluetoothErrorCB, stopDiscoverySuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ retValue = adapter.stopDiscovery();\r
+ assert_equals(retValue, undefined, "stopDiscovery returns wrong value");\r
+ t.done();\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ testBluetoothErrorCB = t.step_func(function (e) {\r
+ assert_unreached("testBluetoothErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setBluetoothDiscoveryCleanup(adapter);\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery_callback_onerror</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_callback_onerror
-//==== LABEL Check if error callback of stopDiscovery method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned off.
-//==== TEST_CRITERIA MERRCB
-setup({timeout: 180000});
-var adapter, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback;
-t.step(function () {
- errorCallback = t.step_func(function (error) {
- assert_equals(error.name, "ServiceNotAvailableError", "expected another error");
- t.done();
- });
-
- successCallback = t.step_func(function () {
- assert_unreached("invalid successCallback invoked");
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.stopDiscovery(successCallback, errorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_callback_onerror</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_callback_onerror\r
+//==== LABEL Check if error callback of stopDiscovery method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned off.\r
+//==== TEST_CRITERIA MERRCB\r
+setup({timeout: 180000});\r
+var adapter, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ errorCallback = t.step_func(function (error) {\r
+ assert_equals(error.name, "ServiceNotAvailableError", "expected another error");\r
+ t.done();\r
+ });\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("invalid successCallback invoked");\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.stopDiscovery(successCallback, errorCallback);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch
-//==== LABEL Check whether stopDiscovery() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,
- conversionTable, successCallback, discoverDevicesError, stopDiscoverySuccess, errorCallback, stopDiscoverySuccessCB;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("Method stopDiscovery shouldn't end successfully.");
- });
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.stopDiscovery(successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: t.step_func(function (address) {
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_TypeMismatch\r
+//==== LABEL Check whether stopDiscovery() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,\r
+ conversionTable, successCallback, discoverDevicesError, stopDiscoverySuccess, errorCallback, stopDiscoverySuccessCB;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method stopDiscovery shouldn't end successfully.");\r
+ });\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.stopDiscovery(successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb
-//==== LABEL Check stopDiscovery() argument errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var adapter, t = async_test(document.title, {timeout: 180000}),
- exceptionName = "TypeMismatchError", incorrectCallback, stopDiscoverySuccess, discoverDevicesSuccessCallback,
- discoverDevicesError, successCallback, discoverDevicesSuccessCallback, stopDiscoverySuccessCB;
-t.step(function () {
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- successCallback = t.step_func(function (e) {
- assert_unreached("Method stopDiscovery shouldn't end successfully.");
- });
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevices() error callback invoked:name" + e.name + ", msg:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- discoverDevicesSuccessCallback = {
- onstarted: function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.stopDiscovery(successCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- },
- ondevicefound: function (device) {
- },
- ondevicedisappeared: function (address) {
- },
- onfinished: function (devices) {
- }
- };
-
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb\r
+//==== LABEL Check stopDiscovery() argument errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+ exceptionName = "TypeMismatchError", incorrectCallback, stopDiscoverySuccess, discoverDevicesSuccessCallback,\r
+ discoverDevicesError, successCallback, discoverDevicesSuccessCallback, stopDiscoverySuccessCB;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ successCallback = t.step_func(function (e) {\r
+ assert_unreached("Method stopDiscovery shouldn't end successfully.");\r
+ });\r
+\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevices() error callback invoked:name" + e.name + ", msg:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.stopDiscovery(successCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ },\r
+ ondevicefound: function (device) {\r
+ },\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: function (devices) {\r
+ }\r
+ };\r
+\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("stopDiscovery" in adapter, "Method stopDiscovery does not exist in bluetooth adapter.");
- check_method_exists(adapter, "stopDiscovery");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var adapter = tizen.bluetooth.getDefaultAdapter();
+assert_true("stopDiscovery" in adapter, "Method stopDiscovery does not exist in bluetooth adapter.");
+check_method_exists(adapter, "stopDiscovery");
+ }
+ }, document.title);
</script>
</body>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch
-//==== LABEL Check whether stopDiscovery() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,
- stopDiscoverySuccess, discoverDevicesError, errorCallback, conversionTable, successCallback, stopDiscoverySuccessCB;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- discoverDevicesSuccessCallback = {
- onstarted: t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.stopDiscovery(successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: t.step_func(function (address) {
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_TypeMismatch\r
+//==== LABEL Check whether stopDiscovery() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, discoverDevicesSuccessCallback,\r
+ stopDiscoverySuccess, discoverDevicesError, errorCallback, conversionTable, successCallback, stopDiscoverySuccessCB;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.stopDiscovery(successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_stopDiscovery_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_invalid_cb
-//==== LABEL Check stopDiscovery() argument successCallback validation - use {onsuccess: function (){}}
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), stopDiscoverySuccess, stopDiscoverySuccessCB, discoverDevicesSuccessCallback,
- adapter, exceptionName = "TypeMismatchError", incorrectCallback, discoverDevicesError, stopDiscoveryError;
-
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method stopDiscovery shouldn't end successfully.");
- })
- };
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- discoverDevicesError = t.step_func(function (e) {
- assert_unreached("discoverDevicesError exception:" + e.message);
- });
-
- stopDiscoveryError = t.step_func(function (e) {
- assert_unreached("stopDiscoveryError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- discoverDevicesSuccessCallback = {
- onstarted: function () {
- assert_throws({name: exceptionName},
- function () {
- adapter.stopDiscovery(incorrectCallback, stopDiscoveryError);
- }, "Given incorrect successCallback.");
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- },
- ondevicefound: function (device) {
- },
- ondevicedisappeared: function (address) {
- },
- onfinished: function (devices) {
- }
- };
- adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_successCallback_invalid_cb\r
+//==== LABEL Check stopDiscovery() argument successCallback validation - use {onsuccess: function (){}}\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), stopDiscoverySuccess, stopDiscoverySuccessCB, discoverDevicesSuccessCallback,\r
+ adapter, exceptionName = "TypeMismatchError", incorrectCallback, discoverDevicesError, stopDiscoveryError;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method stopDiscovery shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ discoverDevicesError = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoveryError = t.step_func(function (e) {\r
+ assert_unreached("stopDiscoveryError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ discoverDevicesSuccessCallback = {\r
+ onstarted: function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.stopDiscovery(incorrectCallback, stopDiscoveryError);\r
+ }, "Given incorrect successCallback.");\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ },\r
+ ondevicefound: function (device) {\r
+ },\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: function (devices) {\r
+ }\r
+ };\r
+ adapter.discoverDevices(discoverDevicesSuccessCallback, discoverDevicesError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery_with_errorCallback</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_with_errorCallback
-//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback, valid_errorCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}),
- stopDiscoverySuccessCB, stopDiscoveryErrorCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;
-
-t.step(function () {
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- stopDiscoveryErrorCB = t.step_func(function (e) {
- assert_unreached("stopDiscoveryErrorCB exception:" + e.message);
- });
-
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- adapter.stopDiscovery(stopDiscoverySuccessCB, stopDiscoveryErrorCB);
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- })
- };
-
- testBluetoothErrorCB = t.step_func(function (e) {
- assert_unreached("testBluetoothErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_with_errorCallback</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_with_errorCallback\r
+//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+ stopDiscoverySuccessCB, stopDiscoveryErrorCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ stopDiscoveryErrorCB = t.step_func(function (e) {\r
+ assert_unreached("stopDiscoveryErrorCB exception:" + e.message);\r
+ });\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB, stopDiscoveryErrorCB);\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ testBluetoothErrorCB = t.step_func(function (e) {\r
+ assert_unreached("testBluetoothErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothAdapter_stopDiscovery_with_successCallback</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_stopDiscovery_with_successCallback
-//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback)
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MR
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}),
- stopDiscoverySuccessCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;
-t.step(function () {
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- })
- };
-
- testBluetoothErrorCB = t.step_func(function (e) {
- assert_unreached("testBluetoothErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothAdapter_stopDiscovery_with_successCallback</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_stopDiscovery_with_successCallback\r
+//==== LABEL Check with optional arguments stopDiscovery(valid_successCallback)\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MR\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+ stopDiscoverySuccessCB, discoverDevicesSuccessCB, testBluetoothErrorCB, stopDiscoverySuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ testBluetoothErrorCB = t.step_func(function (e) {\r
+ assert_unreached("testBluetoothErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, testBluetoothErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothAdapter_unsetChangeListener</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothAdapter_unsetChangeListener
-//==== LABEL Check unsetChangeListener of adapter
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:unsetChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the test device MUST be turned on.
-//==== STEP Turn off Bluetooth after run.
-//==== EXPECT all subtests should be successful
-//==== STEP Turn on after test.
-//==== EXPECT all subtests should be successful
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 180000});
-
-var adapter, listener, retValue, powerOffSuccess, t = async_test(document.title, {timeout: 180000});
-t.step(function () {
- listener = {
- onstatechanged: t.step_func(function (powered) {
- assert_unreached("listener should be dropped");
- }),
- onnamechanged: t.step_func(function (name) {
- }),
- onvisibilitychanged: t.step_func(function (visible) {
- })
- };
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.setChangeListener(listener);
-
- retValue = adapter.unsetChangeListener();
- assert_equals(retValue, undefined, "unsetChangeListener did not return undefined");
-
- var state = adapter.powered;
- alert("Please turn bluetooth off.");
- if (adapter.powered == state) {
- assert_unreached("Bluetooth adapter state did not change. Please repeat.");
- }
- t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothAdapter_unsetChangeListener</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothAdapter_unsetChangeListener\r
+//==== LABEL Check unsetChangeListener of adapter\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:unsetChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the test device MUST be turned on.\r
+//==== STEP Turn off Bluetooth after run.\r
+//==== EXPECT all subtests should be successful\r
+//==== STEP Turn on after test.\r
+//==== EXPECT all subtests should be successful\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, listener, retValue, powerOffSuccess, t = async_test(document.title, {timeout: 180000});\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ listener = {\r
+ onstatechanged: t.step_func(function (powered) {\r
+ assert_unreached("listener should be dropped");\r
+ }),\r
+ onnamechanged: t.step_func(function (name) {\r
+ }),\r
+ onvisibilitychanged: t.step_func(function (visible) {\r
+ })\r
+ };\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.setChangeListener(listener);\r
+\r
+ retValue = adapter.unsetChangeListener();\r
+ assert_equals(retValue, undefined, "unsetChangeListener did not return undefined");\r
+\r
+ var state = adapter.powered;\r
+ alert("Please turn bluetooth off.");\r
+ if (adapter.powered == state) {\r
+ assert_unreached("Bluetooth adapter state did not change. Please repeat.");\r
+ }\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
var adapter;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- assert_true("unsetChangeListener" in adapter, "Method unsetChangeListener does not exist in bluetooth adapter.");
- check_method_exists(adapter, "unsetChangeListener");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ assert_true("unsetChangeListener" in adapter, "Method unsetChangeListener does not exist in bluetooth adapter.");
+ check_method_exists(adapter, "unsetChangeListener");
+ }
}, document.title);
</script>
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
var adapter;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- checkExtraArgument(adapter, "unsetChangeListener");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ checkExtraArgument(adapter, "unsetChangeListener");
+ }
}, document.title);
</script>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== TEST_CRITERIA AE AT ARO
var adapter = null;
test(function () {
- adapter = tizen.bluetooth.getDefaultAdapter();
- check_readonly(adapter, "visible", adapter.visible, "boolean", !adapter.visible);
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ check_readonly(adapter, "visible", adapter.visible, "boolean", !adapter.visible);
+ }
+ }, document.title);
</script>
</body>
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-->
<html>
setup({timeout: 180000});
var t = async_test(document.title, {timeout: 180000}), adapter, gotDeviceInfo, gotDeviceError,
- onBondingSuccess, onBondingError, powerOnSuccess, minor, major, devService;
+onBondingSuccess, onBondingError, powerOnSuccess, minor, major, devService;
t.step(function () {
+ if (BT_SUPPORT) { // network.bluetooth support
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
-
- //BluetoothClass_attribute AT
- test(function () {
- assert_type(device.name, "string", "Device name type check:");
- assert_type(device.address, "string", "Device address type check:");
- assert_type(device.deviceClass.major, "octet", "Device deviceClass.major type check:");
- assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");
- assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");
- assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");
- assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");
- } , "BluetoothClass_attribute");
-
- //BluetoothClass_extend OBX
- test(function () {
- check_extensibility(device.deviceClass);
- }, "BluetoothClass_extend");
-
- //BluetoothClass_hasService_exist ME
- test(function () {
- assert_true("hasService" in device.deviceClass, "hasService in gotDeviceInfo");
- check_method_exists(device.deviceClass, "hasService");
- }, "BluetoothClass_hasService_exist");
-
- //BluetoothClass_major_attribute AE AT ARO
- test(function () {
- major = device.deviceClass.major;
- check_readonly(device.deviceClass, "major", major, "number", "Tizen");
- }, "BluetoothClass_major_attribute");
-
- //BluetoothClass_minor_attribute AE AT ARO
- test(function () {
- minor = device.deviceClass.minor;
- check_readonly(device.deviceClass, "minor", minor, "number", "Tizen");
- }, "BluetoothClass_minor_attribute");
-
- //BluetoothClass_services_attribute AE AT ARO
- test(function () {
- assert_own_property(device.deviceClass, "services", "No property service name.");
- assert_type(device.deviceClass.services, "array", "device.deviceClass.services is type array.");
- assert_true(device.deviceClass.services.length >= 0, "bluetooth device services not found");
- }, "BluetoothClass_services_attribute");
-
- if(device.deviceClass.services.length > 0) {
- test(function () {
- devService = device.deviceClass.services[0];
- device.deviceClass.services[0] = null;
- device.deviceClass.services = [];
- assert_type(device.deviceClass.services[0], "unsigned short", "device.deviceClass.services[0] is type number.");
- assert_true(devService === device.deviceClass.services[0], "device.deviceClass.services[0] readonly");
- }, "BluetoothClass_services_readonly_attribute");
- } else if(device.deviceClass.services.length === 0) {
- test(function() {
- device.deviceClass.services[0] = 'test';
- assert_true( 0 === device.deviceClass.services.length, "device.deviceClass.services is readonly");
- }, "BluetoothClass_services_readonly_attribute");
- } else {
- assert_unreached("Device has not services");
- }
+ add_result_callback(function () {
+ clearBonding(REMOTE_DEVICE_ADDRESS);
+ });
- t.done();
- });
+ gotDeviceInfo = t.step_func(function (device) {
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
+ //BluetoothClass_attribute AT
+ test(function () {
+ assert_type(device.name, "string", "Device name type check:");
+ assert_type(device.address, "string", "Device address type check:");
+ assert_type(device.deviceClass.major, "octet", "Device deviceClass.major type check:");
+ assert_type(device.deviceClass.minor, "octet", "Device deviceClass.minor type check:");
+ assert_type(device.deviceClass.services, "object", "Device deviceClass.services type check:");
+ assert_type(device.deviceClass.hasService, "function", "Device deviceClass.hasService type check:");
+ assert_type(device.deviceClass.hasService(0), "boolean", "Device deviceClass.hasService return type check:");
+ }, "BluetoothClass_attribute");
+
+ //BluetoothClass_extend OBX
+ test(function () {
+ check_extensibility(device.deviceClass);
+ }, "BluetoothClass_extend");
- onBondingSuccess = t.step_func(function (device) {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
+ //BluetoothClass_hasService_exist ME
+ test(function () {
+ assert_true("hasService" in device.deviceClass, "hasService in gotDeviceInfo");
+ check_method_exists(device.deviceClass, "hasService");
+ }, "BluetoothClass_hasService_exist");
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
+ //BluetoothClass_major_attribute AE AT ARO
+ test(function () {
+ major = device.deviceClass.major;
+ check_readonly(device.deviceClass, "major", major, "number", "Tizen");
+ }, "BluetoothClass_major_attribute");
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
+ //BluetoothClass_minor_attribute AE AT ARO
+ test(function () {
+ minor = device.deviceClass.minor;
+ check_readonly(device.deviceClass, "minor", minor, "number", "Tizen");
+ }, "BluetoothClass_minor_attribute");
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
+ //BluetoothClass_services_attribute AE AT ARO
+ test(function () {
+ assert_own_property(device.deviceClass, "services", "No property service name.");
+ assert_type(device.deviceClass.services, "array", "device.deviceClass.services is type array.");
+ assert_true(device.deviceClass.services.length >= 0, "bluetooth device services not found");
+ }, "BluetoothClass_services_attribute");
+
+ if (device.deviceClass.services.length > 0) {
+ test(function () {
+ devService = device.deviceClass.services[0];
+ device.deviceClass.services[0] = null;
+ device.deviceClass.services = [];
+ assert_type(device.deviceClass.services[0], "unsigned short", "device.deviceClass.services[0] is type number.");
+ assert_true(devService === device.deviceClass.services[0], "device.deviceClass.services[0] readonly");
+ }, "BluetoothClass_services_readonly_attribute");
+ } else if (device.deviceClass.services.length === 0) {
+ test(function () {
+ device.deviceClass.services[0] = 'test';
+ assert_true(0 === device.deviceClass.services.length, "device.deviceClass.services is readonly");
+ }, "BluetoothClass_services_readonly_attribute");
+ } else {
+ assert_unreached("Device has not services");
+ }
+
+ t.done();
+ });
+
+ gotDeviceError = t.step_func(function (e) {
+ assert_unreached("gotDeviceError exception:" + e.message);
+ });
+
+ onBondingSuccess = t.step_func(function (device) {
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
+ });
+
+ onBondingError = t.step_func(function (e) {
+ assert_unreached("onBondingError exception:" + e.message);
+ });
+
+ powerOnSuccess = t.step_func(function () {
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
+ });
+
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ setPowered(t, adapter, powerOnSuccess);
+
+ } else {
+ t.done();
+ }
});
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "AUDIO_VIDEO", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "AUDIO_VIDEO", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "COMPUTER", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "COMPUTER", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMajor_HEALTH_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMajor_HEALTH_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMajor_HEALTH
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMajor:HEALTH A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMajor, "HEALTH", 0x09, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMajor_HEALTH_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMajor_HEALTH_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMajor_HEALTH\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMajor:HEALTH A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMajor, "HEALTH", 0x09, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "IMAGING", 0x06, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "IMAGING", 0x06, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "MISC", 0x00, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "MISC", 0x00, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "NETWORK", 0x03, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "NETWORK", 0x03, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "PERIPHERAL", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "PERIPHERAL", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "PHONE", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "PHONE", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "TOY", 0x08, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "TOY", 0x08, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "UNCATEGORIZED", 0x1F, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "UNCATEGORIZED", 0x1F, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMajor, "WEARABLE", 0x07, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMajor, "WEARABLE", 0x07, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBX
test(function () {
- check_extensibility(tizen.bluetooth.deviceMajor);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_extensibility(tizen.bluetooth.deviceMajor);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothClassDeviceMajor");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothClassDeviceMajor");
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_CAMCORDER", 0x0d, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_CAMCORDER", 0x0d, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_CAR_AUDIO", 0x08, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_CAR_AUDIO", 0x08, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_DISPLAY_AND_LOUDSPEAKER", 0x0f, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_DISPLAY_AND_LOUDSPEAKER", 0x0f, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_GAMING_TOY", 0x12, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_GAMING_TOY", 0x12, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_HANDSFREE", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_HANDSFREE", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_HEADPHONES", 0x06, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_HEADPHONES", 0x06, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_HIFI", 0x0a, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_HIFI", 0x0a, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_LOUDSPEAKER", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_LOUDSPEAKER", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_MICROPHONE", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_MICROPHONE", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_MONITOR", 0x0e, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_MONITOR", 0x0e, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_PORTABLE_AUDIO", 0x07, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_PORTABLE_AUDIO", 0x07, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_SETTOP_BOX", 0x09, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_SETTOP_BOX", 0x09, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_UNRECOGNIZED", 0x00, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_UNRECOGNIZED", 0x00, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_VCR", 0x0b, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_VCR", 0x0b, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CAMERA", 0x0c, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CAMERA", 0x0c, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CONFERENCING", 0x10, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_VIDEO_CONFERENCING", 0x10, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "AV_WEARABLE_HEADSET", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "AV_WEARABLE_HEADSET", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_DESKTOP", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_DESKTOP", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_HANDHELD_PC_OR_PDA", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_HANDHELD_PC_OR_PDA", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_LAPTOP", 0x03, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_LAPTOP", 0x03, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_PALM_PC_OR_PDA", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_PALM_PC_OR_PDA", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_SERVER", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_SERVER", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_UNCATEGORIZED", 0x00, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_UNCATEGORIZED", 0x00, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "COMPUTER_WEARABLE", 0x06, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "COMPUTER_WEARABLE", 0x06, "number", 0x7B);
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_ANKLE_PROSTHESIS A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_ANKLE_PROSTHESIS", 0x0d, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_ANKLE_PROSTHESIS\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_ANKLE_PROSTHESIS A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_ANKLE_PROSTHESIS", 0x0d, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BLOOD_PRESSURE_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_BLOOD_PRESSURE_MONITOR", 0x01, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BLOOD_PRESSURE_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BLOOD_PRESSURE_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_BLOOD_PRESSURE_MONITOR", 0x01, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BODY_COMPOSITION_ANALYZER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_BODY_COMPOSITION_ANALYZER", 0x09, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_BODY_COMPOSITION_ANALYZER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_BODY_COMPOSITION_ANALYZER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_BODY_COMPOSITION_ANALYZER", 0x09, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_DATA_DISPLAY A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_DATA_DISPLAY", 0x07, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_DATA_DISPLAY\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_DATA_DISPLAY A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_DATA_DISPLAY", 0x07, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_GLUCOSE_METER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_GLUCOSE_METER", 0x04, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_GLUCOSE_METER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_GLUCOSE_METER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_GLUCOSE_METER", 0x04, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_KNEE_PROSTHESIS A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_KNEE_PROSTHESIS", 0x0c, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_KNEE_PROSTHESIS\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_KNEE_PROSTHESIS A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_KNEE_PROSTHESIS", 0x0c, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_MEDICATION_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_MEDICATION_MONITOR", 0x0b, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_MEDICATION_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_MEDICATION_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_MEDICATION_MONITOR", 0x0b, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PEAK_FLOW_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_PEAK_FLOW_MONITOR", 0x0a, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PEAK_FLOW_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PEAK_FLOW_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_PEAK_FLOW_MONITOR", 0x0a, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_OXIMETER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_OXIMETER", 0x05, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_OXIMETER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_OXIMETER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_OXIMETER", 0x05, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_RATE_MONITOR A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_RATE_MONITOR", 0x06, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_PULSE_RATE_MONITOR\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_PULSE_RATE_MONITOR A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_PULSE_RATE_MONITOR", 0x06, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_STEP_COUNTER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_STEP_COUNTER", 0x08, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_STEP_COUNTER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_STEP_COUNTER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_STEP_COUNTER", 0x08, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_THERMOMETER
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_THERMOMETER A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_THERMOMETER", 0x02, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_THERMOMETER_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_THERMOMETER\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_THERMOMETER A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_THERMOMETER", 0x02, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_UNDEFINED
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_UNDEFINED A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_UNDEFINED", 0x00, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_UNDEFINED_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_UNDEFINED\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_UNDEFINED A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_UNDEFINED", 0x00, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-
-<head>
-<title>BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const
-//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_WEIGHING_SCALE A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
-test(function () {
- check_const(tizen.bluetooth.deviceMinor, "HEALTH_WEIGHING_SCALE", 0x03, "number", 0x7B);
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE_const\r
+//==== LABEL Check various identifiers of BluetoothClassDeviceMinor_HEALTH_WEIGHING_SCALE\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothClassDeviceMinor:HEALTH_WEIGHING_SCALE A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO\r
+test(function () {\r
+ check_const(tizen.bluetooth.deviceMinor, "HEALTH_WEIGHING_SCALE", 0x03, "number", 0x7B);\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "IMAGING_CAMERA", 0x08, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "IMAGING_CAMERA", 0x08, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "IMAGING_DISPLAY", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "IMAGING_DISPLAY", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "IMAGING_PRINTER", 0x20, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "IMAGING_PRINTER", 0x20, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "IMAGING_SCANNER", 0x10, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "IMAGING_SCANNER", 0x10, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "IMAGING_UNCATEGORIZED", 0x00, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "IMAGING_UNCATEGORIZED", 0x00, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_CARD_READER", 0x06, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_CARD_READER", 0x06, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DEGITIZER_TABLET", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DEGITIZER_TABLET", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DIGITAL_PEN", 0x07, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_DIGITAL_PEN", 0x07, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_GAMEPAD", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_GAMEPAD", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_INPUT_DEVICE", 0x09, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_INPUT_DEVICE", 0x09, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_SCANNER", 0x08, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_HANDHELD_SCANNER", 0x08, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_JOYSTICK", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_JOYSTICK", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE", 0x30, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD_AND_POINTING_DEVICE", 0x30, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD", 0x10, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_KEYBOARD", 0x10, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_POINTING_DEVICE", 0x20, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_POINTING_DEVICE", 0x20, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_REMOTE_CONTROL", 0x03, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_REMOTE_CONTROL", 0x03, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_SENSING_DEVICE", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_SENSING_DEVICE", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_UNCATEGORIZED", 0, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PERIPHERAL_UNCATEGORIZED", 0, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PHONE_CELLULAR", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PHONE_CELLULAR", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PHONE_CORDLESS", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PHONE_CORDLESS", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PHONE_ISDN", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PHONE_ISDN", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PHONE_MODEM_OR_GATEWAY", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PHONE_MODEM_OR_GATEWAY", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PHONE_SMARTPHONE", 0x03, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PHONE_SMARTPHONE", 0x03, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "PHONE_UNCATEGORIZED", 0x00, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "PHONE_UNCATEGORIZED", 0x00, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "TOY_CONTROLLER", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "TOY_CONTROLLER", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "TOY_DOLL", 0x03, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "TOY_DOLL", 0x03, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "TOY_GAME", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "TOY_GAME", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "TOY_ROBOT", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "TOY_ROBOT", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "TOY_VEHICLE", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "TOY_VEHICLE", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "WEARABLE_GLASSES", 0x05, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "WEARABLE_GLASSES", 0x05, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "WEARABLE_HELMET", 0x04, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "WEARABLE_HELMET", 0x04, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "WEARABLE_JACKET", 0x03, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "WEARABLE_JACKET", 0x03, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "WEARABLE_PAGER", 0x02, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "WEARABLE_PAGER", 0x02, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceMinor, "WEARABLE_WRITST_WATCH", 0x01, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceMinor, "WEARABLE_WRITST_WATCH", 0x01, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBX
test(function () {
- check_extensibility(tizen.bluetooth.deviceMinor);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_extensibility(tizen.bluetooth.deviceMinor);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothClassDeviceMinor");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothClassDeviceMinor");
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "AUDIO", 0x0100, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "AUDIO", 0x0100, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "CAPTURING", 0x0040, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "CAPTURING", 0x0040, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "INFORMATION", 0x0400, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "INFORMATION", 0x0400, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "LIMITED_DISCOVERABILITY", 0x0001, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "LIMITED_DISCOVERABILITY", 0x0001, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "NETWORKING", 0x0010, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "NETWORKING", 0x0010, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "OBJECT_TRANSFER", 0x0080, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "OBJECT_TRANSFER", 0x0080, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "POSITIONING", 0x0008, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "POSITIONING", 0x0008, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "RENDERING", 0x0020, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "RENDERING", 0x0020, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth.deviceService, "TELEPHONY", 0x0200, "number", 0x7B);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth.deviceService, "TELEPHONY", 0x0200, "number", 0x7B);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBX
test(function () {
- check_extensibility(tizen.bluetooth.deviceService);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_extensibility(tizen.bluetooth.deviceService);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothClassDeviceService");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothClassDeviceService");
+ }
}, document.title);
</script>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
+Lei, ZhanX <zhanx.lei@intel.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-->
var adapter = null, t = async_test(document.title, {timeout: 180000}), gotDeviceInfo,
gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;
t.step(function () {
+ if (BT_SUPPORT) { // network.bluetooth support
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- if (device.deviceClass.services.length > 0){
- assert_true(device.deviceClass.hasService(device.deviceClass.services[0]), "hasService in gotDeviceInfo");
- t.done();
- } else if(device.deviceClass.services.length === 0) {
- assert_true( 0 === device.deviceClass.services.length, "Empty Service in gotDeviceInfo");
- t.done();
- } else {
- assert_unreached("Device has not services");
- }
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
+ add_result_callback(function () {
+ clearBonding(REMOTE_DEVICE_ADDRESS);
+ });
+
+ gotDeviceInfo = t.step_func(function (device) {
+ if (device.deviceClass.services.length > 0) {
+ assert_true(device.deviceClass.hasService(device.deviceClass.services[0]), "hasService in gotDeviceInfo");
+ t.done();
+ } else if (device.deviceClass.services.length === 0) {
+ assert_true(0 === device.deviceClass.services.length, "Empty Service in gotDeviceInfo");
+ t.done();
+ } else {
+ assert_unreached("Device has not services");
+ }
+ });
+
+ gotDeviceError = t.step_func(function (e) {
+ assert_unreached("gotDeviceError exception:" + e.message);
+ });
+
+ onBondingSuccess = t.step_func(function (device) {
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
+ });
+
+ onBondingError = t.step_func(function (e) {
+ assert_unreached("onBondingError exception:" + e.message);
+ });
+
+ powerOnSuccess = t.step_func(function () {
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
+ });
+
+ adapter = tizen.bluetooth.getDefaultAdapter();
+ setPowered(t, adapter, powerOnSuccess);
+
+ } else {
+ t.done();
+ }
});
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothClass");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothClass");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceSuccessCallback:onsuccess M
-//==== TEST_CRITERIA CBT CBOA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:address A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:deviceClass A
-//==== TEST_CRITERIA AE AT ARO(loose)
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isBonded M
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isConnected A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isTrusted A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:name A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:uuids A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:BluetoothDevice U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== TEST_CRITERIA MC
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess, errorCallback,
- successCallback, exceptionName = "TypeMismatchError", conversionTable, conversionErrorCallback, conversionSuccessCallback,
- incorrectSuccessCallback, incorrectErrorCallback, successCallback, errorCallback, deviceClassCP, fakeDeviceClass, devUuid, i;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- incorrectSuccessCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Invalid successCallback invoked");
- })
- };
- incorrectErrorCallback = {
- onerror: t.step_func(function () {
- assert_unreached("Invalid errorCallback invoked: ");
- })
- };
-
- successCallback = t.step_func(function () {
- assert_unreached("successCallback exception");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- //BluetoothDeviceSuccessCallback CBT CBOA
- test(function () {
- assert_true("name" in device, "No name in device");
- assert_true("address" in device, "No address in device");
- assert_true("deviceClass" in device, "No deviceClass in device");
- assert_true("isBonded" in device, "No isBonded in device");
- assert_true("isTrusted" in device, "No isTrusted in device");
- assert_true("isConnected" in device, "No isConnected in device");
- assert_true("uuids" in device, "No uuids in device");
- assert_type(device.connectToServiceByUUID, "function", "Method connectToServiceByUUID does not exist.");
- }, "BluetoothDeviceSuccessCallback_onsuccess");
-
- //address AE AT ARO
- test(function () {
- check_readonly(device, "address", REMOTE_DEVICE_ADDRESS, "string", device.address + "Tizen");
- } , "BluetoothDevice_address_attribute");
-
- //deviceClass AE AT ARO(loose)
- test(function () {
- assert_own_property(device, "deviceClass", "device does not own deviceClass property.");
- assert_own_property(device.deviceClass, "major", "device.deviceClass does not own major property.");
- assert_own_property(device.deviceClass, "minor", "device.deviceClass does not own minor property.");
- assert_own_property(device.deviceClass, "services", "device.deviceClass does not own services property.");
-
- assert_type(device.deviceClass, "object", "Type of deviceClass is different.");
-
- //deviceClass is obtained by getter so I can not directly test the override
- deviceClassCP = device.deviceClass;
- fakeDeviceClass = {
- major:0x01,
- minor:0x01,
- services:[]
- };
- device.deviceClass = fakeDeviceClass;
- assert_equals(device.deviceClass.major, deviceClassCP.major, "deviceClass can be modified.");
- assert_equals(device.deviceClass.minor, deviceClassCP.minor, "deviceClass can be modified.");
- assert_array_equals(device.deviceClass.services, deviceClassCP.services, "deviceClass can be modified.");
- }, "BluetoothDevice_deviceClass_attribute");
-
- //isBonded AE AT ARO
- test(function () {
- check_readonly(device, "isBonded", true, "boolean", false);
- } , "BluetoothDevice_isBonded_attribute");
-
- //isConnected AE AT ARO
- test(function () {
- check_readonly(device, "isConnected", device.isConnected, "boolean", !device.isConnected);
- } , "BluetoothDevice_isConnected_attribute");
-
- //isTrusted AE AT ARO
- test(function () {
- check_readonly(device, "isTrusted", device.isTrusted, "boolean", !device.isTrusted);
- } , "BluetoothDevice_isTrusted_attribute");
-
- //name AE AT ARO
- test(function () {
- check_readonly(device, "name", device.name, "string", device.name+"Tizen");
- } , "BluetoothDevice_name_attribute");
-
- //uuids AE AT ARO
- test(function () {
- assert_true("uuids" in device, "uuids in gotDeviceInfo");
- assert_type(device.uuids, "array", "wrong type of uuids in device");
- assert_true(device.uuids.length > 0, "bluetooth device uuids not found");
-
- devUuid= device.uuids[0];
- assert_type(device.uuids[0], "string", "device.uuids[0] is type string.");
- device.uuids = [];
- device.uuids[0] = "test string";
- assert_true(devUuid === device.uuids[0], "device.uuids[0] readonly");
- }, "BluetoothDevice_uuids_attribute");
-
- //BluetoothDevice OBX
- test(function () {
- check_extensibility(device);
- }, "BluetoothDevice_extend");
-
- //connectToServiceByUUID ME
- test(function () {
- assert_true("connectToServiceByUUID" in device, "No connectToServiceByUUID in device");
- check_method_exists(device, "connectToServiceByUUID");
- }, "BluetoothDevice_connectToServiceByUUID_exist");
-
- //connectToServiceByUUID MMA
- test(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- device.connectToServiceByUUID();
- }, "Method with non optional argument.");
- }, "BluetoothDevice_connectToServiceByUUID_missarg");
-
- //connectToServiceByUUID errorCallback MTCB
- test(function () {
- assert_throws({name: exceptionName},
- function () {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, incorrectErrorCallback);
- }, exceptionName + " should be thrown - given incorrect error callback.");
- }, "BluetoothDevice_connectToServiceByUUID_errorCallback_invalid_cb");
-
- //connectToServiceByUUID successCallback MTCB
- test(function () {
- assert_throws({name: exceptionName},
- function () {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, incorrectSuccessCallback, errorCallback);
- }, exceptionName + " should be thrown - given incorrect error callback.");
- }, "BluetoothDevice_connectToServiceByUUID_successCallback_invalid_cb");
-
- //connectToServiceByUUID errorCallback MC
- test(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for(i = 0; i < conversionTable.length; i++) {
- conversionErrorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, conversionErrorCallback);
- }, exceptionName + " should be thrown - given incorrect errorCallback.");
- }
- }, "BluetoothDevice_connectToServiceByUUID_errorCallback_TypeMismatch");
-
- //connectToServiceByUUID successCallback MC
- test(function () {
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for(i = 0; i < conversionTable.length; i++) {
- conversionSuccessCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, conversionSuccessCallback, errorCallback);
- }, exceptionName + " should be thrown - given incorrect successCallback.");
- }
- }, "BluetoothDevice_connectToServiceByUUID_successCallback_TypeMismatch");
-
- t.done();
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceSuccessCallback:onsuccess M\r
+//==== TEST_CRITERIA CBT CBOA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:address A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:deviceClass A\r
+//==== TEST_CRITERIA AE AT ARO(loose)\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isBonded M\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isConnected A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:isTrusted A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:name A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:uuids A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:BluetoothDevice U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingError, onBondingSuccess, errorCallback,\r
+ successCallback, exceptionName = "TypeMismatchError", conversionTable, conversionErrorCallback, conversionSuccessCallback,\r
+ incorrectSuccessCallback, incorrectErrorCallback, successCallback, errorCallback, deviceClassCP, fakeDeviceClass, devUuid, i;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ incorrectSuccessCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Invalid successCallback invoked");\r
+ })\r
+ };\r
+ incorrectErrorCallback = {\r
+ onerror: t.step_func(function () {\r
+ assert_unreached("Invalid errorCallback invoked: ");\r
+ })\r
+ };\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("successCallback exception");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ //BluetoothDeviceSuccessCallback CBT CBOA\r
+ test(function () {\r
+ assert_true("name" in device, "No name in device");\r
+ assert_true("address" in device, "No address in device");\r
+ assert_true("deviceClass" in device, "No deviceClass in device");\r
+ assert_true("isBonded" in device, "No isBonded in device");\r
+ assert_true("isTrusted" in device, "No isTrusted in device");\r
+ assert_true("isConnected" in device, "No isConnected in device");\r
+ assert_true("uuids" in device, "No uuids in device");\r
+ assert_type(device.connectToServiceByUUID, "function", "Method connectToServiceByUUID does not exist.");\r
+ }, "BluetoothDeviceSuccessCallback_onsuccess");\r
+\r
+ //address AE AT ARO\r
+ test(function () {\r
+ check_readonly(device, "address", REMOTE_DEVICE_ADDRESS, "string", device.address + "Tizen");\r
+ }, "BluetoothDevice_address_attribute");\r
+\r
+ //deviceClass AE AT ARO(loose)\r
+ test(function () {\r
+ assert_own_property(device, "deviceClass", "device does not own deviceClass property.");\r
+ assert_own_property(device.deviceClass, "major", "device.deviceClass does not own major property.");\r
+ assert_own_property(device.deviceClass, "minor", "device.deviceClass does not own minor property.");\r
+ assert_own_property(device.deviceClass, "services", "device.deviceClass does not own services property.");\r
+\r
+ assert_type(device.deviceClass, "object", "Type of deviceClass is different.");\r
+\r
+ //deviceClass is obtained by getter so I can not directly test the override\r
+ deviceClassCP = device.deviceClass;\r
+ fakeDeviceClass = {\r
+ major: 0x01,\r
+ minor: 0x01,\r
+ services: []\r
+ };\r
+ device.deviceClass = fakeDeviceClass;\r
+ assert_equals(device.deviceClass.major, deviceClassCP.major, "deviceClass can be modified.");\r
+ assert_equals(device.deviceClass.minor, deviceClassCP.minor, "deviceClass can be modified.");\r
+ assert_array_equals(device.deviceClass.services, deviceClassCP.services, "deviceClass can be modified.");\r
+ }, "BluetoothDevice_deviceClass_attribute");\r
+\r
+ //isBonded AE AT ARO\r
+ test(function () {\r
+ check_readonly(device, "isBonded", true, "boolean", false);\r
+ }, "BluetoothDevice_isBonded_attribute");\r
+\r
+ //isConnected AE AT ARO\r
+ test(function () {\r
+ check_readonly(device, "isConnected", device.isConnected, "boolean", !device.isConnected);\r
+ }, "BluetoothDevice_isConnected_attribute");\r
+\r
+ //isTrusted AE AT ARO\r
+ test(function () {\r
+ check_readonly(device, "isTrusted", device.isTrusted, "boolean", !device.isTrusted);\r
+ }, "BluetoothDevice_isTrusted_attribute");\r
+\r
+ //name AE AT ARO\r
+ test(function () {\r
+ check_readonly(device, "name", device.name, "string", device.name + "Tizen");\r
+ }, "BluetoothDevice_name_attribute");\r
+\r
+ //uuids AE AT ARO\r
+ test(function () {\r
+ assert_true("uuids" in device, "uuids in gotDeviceInfo");\r
+ assert_type(device.uuids, "array", "wrong type of uuids in device");\r
+ assert_true(device.uuids.length > 0, "bluetooth device uuids not found");\r
+\r
+ devUuid = device.uuids[0];\r
+ assert_type(device.uuids[0], "string", "device.uuids[0] is type string.");\r
+ device.uuids = [];\r
+ device.uuids[0] = "test string";\r
+ assert_true(devUuid === device.uuids[0], "device.uuids[0] readonly");\r
+ }, "BluetoothDevice_uuids_attribute");\r
+\r
+ //BluetoothDevice OBX\r
+ test(function () {\r
+ check_extensibility(device);\r
+ }, "BluetoothDevice_extend");\r
+\r
+ //connectToServiceByUUID ME\r
+ test(function () {\r
+ assert_true("connectToServiceByUUID" in device, "No connectToServiceByUUID in device");\r
+ check_method_exists(device, "connectToServiceByUUID");\r
+ }, "BluetoothDevice_connectToServiceByUUID_exist");\r
+\r
+ //connectToServiceByUUID MMA\r
+ test(function () {\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ device.connectToServiceByUUID();\r
+ }, "Method with non optional argument.");\r
+ }, "BluetoothDevice_connectToServiceByUUID_missarg");\r
+\r
+ //connectToServiceByUUID errorCallback MTCB\r
+ test(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, incorrectErrorCallback);\r
+ }, exceptionName + " should be thrown - given incorrect error callback.");\r
+ }, "BluetoothDevice_connectToServiceByUUID_errorCallback_invalid_cb");\r
+\r
+ //connectToServiceByUUID successCallback MTCB\r
+ test(function () {\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, incorrectSuccessCallback, errorCallback);\r
+ }, exceptionName + " should be thrown - given incorrect error callback.");\r
+ }, "BluetoothDevice_connectToServiceByUUID_successCallback_invalid_cb");\r
+\r
+ //connectToServiceByUUID errorCallback MC\r
+ test(function () {\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ conversionErrorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, successCallback, conversionErrorCallback);\r
+ }, exceptionName + " should be thrown - given incorrect errorCallback.");\r
+ }\r
+ }, "BluetoothDevice_connectToServiceByUUID_errorCallback_TypeMismatch");\r
+\r
+ //connectToServiceByUUID successCallback MC\r
+ test(function () {\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ conversionSuccessCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, conversionSuccessCallback, errorCallback);\r
+ }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+ }\r
+ }, "BluetoothDevice_connectToServiceByUUID_successCallback_TypeMismatch");\r
+\r
+ t.done();\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CBNIO
test(function () {
- check_no_interface_object("BluetoothDeviceArraySuccessCallback");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothDeviceArraySuccessCallback");
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDeviceArraySuccessCallback_onsuccess</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDeviceArraySuccessCallback_onsuccess
-//==== LABEL Check if BluetoothDeviceArraySuccessCallback callback is called and if its arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceArraySuccessCallback:onsuccess M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}), i,
- stopDiscoverySuccess, getKnownDeviceserrorCB, getKnownDevicessuccessCB, discoverSuccess, discoverError;
-
-t.step(function () {
- getKnownDevicessuccessCB = t.step_func(function (devices) {
- assert_type(devices, "array", "devices has wrong type");
- assert_true(devices.length > 0, "bluetooth devices not found");
- for (i=0; i < devices.length; i++) {
- check_bluetooth_device(devices[i]);
- }
- t.done();
- });
-
- getKnownDeviceserrorCB = t.step_func(function (e) {
- assert_unreached("getKnownDeviceserrorCB exception:" + e.message);
- });
-
- discoverSuccess = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: function (address) {
- },
- onfinished: t.step_func(function (devices) {
- if (devices.length > 0){
- adapter.getKnownDevices(getKnownDevicessuccessCB, getKnownDeviceserrorCB);
- } else{
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverError = t.step_func(function (e) {
- assert_unreached("discoverError exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverSuccess, discoverError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDeviceArraySuccessCallback_onsuccess</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDeviceArraySuccessCallback_onsuccess\r
+//==== LABEL Check if BluetoothDeviceArraySuccessCallback callback is called and if its arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDeviceArraySuccessCallback:onsuccess M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}), i,\r
+ stopDiscoverySuccess, getKnownDeviceserrorCB, getKnownDevicessuccessCB, discoverSuccess, discoverError;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ getKnownDevicessuccessCB = t.step_func(function (devices) {\r
+ assert_type(devices, "array", "devices has wrong type");\r
+ assert_true(devices.length > 0, "bluetooth devices not found");\r
+ for (i = 0; i < devices.length; i++) {\r
+ check_bluetooth_device(devices[i]);\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ getKnownDeviceserrorCB = t.step_func(function (e) {\r
+ assert_unreached("getKnownDeviceserrorCB exception:" + e.message);\r
+ });\r
+\r
+ discoverSuccess = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: function (address) {\r
+ },\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ adapter.getKnownDevices(getKnownDevicessuccessCB, getKnownDeviceserrorCB);\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverError = t.step_func(function (e) {\r
+ assert_unreached("discoverError exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverSuccess, discoverError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CBNIO
test(function () {
- check_no_interface_object("BluetoothDeviceSuccessCallback");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothDeviceSuccessCallback");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice_connectToServiceByUUID</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice_connectToServiceByUUID
-//==== LABEL Check using connectToServiceByUUID method which is in BluetoothDevice interface to open connection
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,
- onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- if(socket.state === "OPEN"){
- assert_equals(retValue, undefined, "connectToServiceByUUID returns wrong value");
- t.done();
- }else{
- assert_unreached("Socket is closed");
- }
- });
-
- onBondingSuccess = t.step_func(function (device) {
- retValue = device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice_connectToServiceByUUID</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice_connectToServiceByUUID\r
+//==== LABEL Check using connectToServiceByUUID method which is in BluetoothDevice interface to open connection\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,\r
+ onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ if (socket.state === "OPEN") {\r
+ assert_equals(retValue, undefined, "connectToServiceByUUID returns wrong value");\r
+ t.done();\r
+ } else {\r
+ assert_unreached("Socket is closed");\r
+ }\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ retValue = device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice_connectToServiceByUUID_onerror</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice_connectToServiceByUUID_onerror
-//==== LABEL Check if error callback of connectToServiceByUUID method invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MERRCB
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,
- onBondingSuccess, onBondingError, powerOnSuccess, onSocketError;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- assert_unreached("Shouldn't be here");
- });
-
- onSocketError = t.step_func(function (e) {
- assert_equals(e.name, "NotFoundError", "error name in onSocketError");
- t.done();
- });
-
- onBondingSuccess = t.step_func(function (device) {
- device.connectToServiceByUUID(TEST_WRONG_UUID, onSocketConnect, onSocketError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice_connectToServiceByUUID_onerror</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice_connectToServiceByUUID_onerror\r
+//==== LABEL Check if error callback of connectToServiceByUUID method invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MERRCB\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect,\r
+ onBondingSuccess, onBondingError, powerOnSuccess, onSocketError;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ assert_unreached("Shouldn't be here");\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_equals(e.name, "NotFoundError", "error name in onSocketError");\r
+ t.done();\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ device.connectToServiceByUUID(TEST_WRONG_UUID, onSocketConnect, onSocketError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDevice_connectToServiceByUUID_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDevice_connectToServiceByUUID_with_errorCallback
-//==== LABEL Check connectToServiceByUUID with errorCallback
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MOA MAST
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- onSocketConnect, onSocketError, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- if(socket.state === "OPEN") {
- t.done();
- } else {
- assert_unreached("Socket is closed");
- }
- });
-
- onSocketError = t.step_func(function (e) {
- assert_unreached("onSocketError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDevice_connectToServiceByUUID_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDevice_connectToServiceByUUID_with_errorCallback\r
+//==== LABEL Check connectToServiceByUUID with errorCallback\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDevice:connectToServiceByUUID M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MOA MAST\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ onSocketConnect, onSocketError, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ if (socket.state === "OPEN") {\r
+ t.done();\r
+ } else {\r
+ assert_unreached("Socket is closed");\r
+ }\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_unreached("onSocketError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothDevice");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothDevice");
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CBNIO
test(function () {
- check_no_interface_object("BluetoothDiscoverDevicesSuccessCallback");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothDiscoverDevicesSuccessCallback");
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicedisappeared arguments have proper type
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== STEP Disable the bluetooth of the remote device after pop-up is launched on test device.
-//==== EXPECT ondevicedisappeared callback is invoked.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicedisappeared M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessOneCB, discoverDevicesSuccessTwoCB, flag = false;
-
-t.step(function () {
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- discoverDevicesSuccessTwoCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: t.step_func(function (address) {
- assert_type(address, "string", "address has wrong type");
- if(address === REMOTE_DEVICE_ADDRESS) {
- flag = true;
- }
- }),
- onfinished: t.step_func(function (devices) {
- if(flag) {
- t.done();
- } else {
- adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);
- }
- })
- };
-
- discoverDevicesSuccessOneCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: t.step_func(function (address) {
- }),
- onfinished: t.step_func(function (devices) {
- if (devices.length > 0 ){
- adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);
- alert("Please disable bluetooth on other device");
- } else {
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessOneCB, discoverDevicesErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicedisappeared arguments have proper type\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP Disable the bluetooth of the remote device after pop-up is launched on test device.\r
+//==== EXPECT ondevicedisappeared callback is invoked.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicedisappeared M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessOneCB, discoverDevicesSuccessTwoCB, flag = false;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ discoverDevicesSuccessTwoCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ assert_type(address, "string", "address has wrong type");\r
+ if (address === REMOTE_DEVICE_ADDRESS) {\r
+ flag = true;\r
+ }\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (flag) {\r
+ t.done();\r
+ } else {\r
+ adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesSuccessOneCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);\r
+ alert("Please disable bluetooth on other device");\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessOneCB, discoverDevicesErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_ondevicefound</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicefound
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicefound arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicefound M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBT CBOA
-
-setup({timeout:300000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}),
- stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessCB;
-
-t.step(function () {
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- check_bluetooth_device(device);
- t.done();
- }),
- ondevicedisappeared: t.step_func(function (address) {
- }),
- onfinished: t.step_func(function (devices) {
- if (devices.length === 0){
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setBluetoothDiscoveryCleanup(adapter);
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_ondevicefound</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_ondevicefound\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its ondevicefound arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:ondevicefound M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBT CBOA\r
+\r
+setup({timeout:300000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}),\r
+ stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ check_bluetooth_device(device);\r
+ t.done();\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length === 0) {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setBluetoothDiscoveryCleanup(adapter);\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_onfinished</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onfinished
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onfinished arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onfinished M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}),
- stopDiscoverySuccess, discoverDevicesErrorCB, i, discoverDevicesSuccessCB;
-
-t.step(function () {
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- }),
- ondevicedisappeared: t.step_func(function (address) {
- }),
- onfinished: t.step_func(function (devices) {
- if (devices.length > 0) {
- check_bluetooth_device_array(devices);
- for (i=0; i < devices.length; i++) {
- check_bluetooth_device(devices[i]);
- }
- t.done();
- } else {
- setTimeout(stopDiscoverySuccess, 1000);
- }
- })
- };
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_onfinished</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onfinished\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onfinished arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onfinished M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}),\r
+ stopDiscoverySuccess, discoverDevicesErrorCB, i, discoverDevicesSuccessCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function (address) {\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ if (devices.length > 0) {\r
+ check_bluetooth_device_array(devices);\r
+ for (i = 0; i < devices.length; i++) {\r
+ check_bluetooth_device(devices[i]);\r
+ }\r
+ t.done();\r
+ } else {\r
+ setTimeout(stopDiscoverySuccess, 1000);\r
+ }\r
+ })\r
+ };\r
+\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothDiscoverDevicesSuccessCallback_onstarted</title>
-<meta charset="utf-8">
-<meta name="timeout" content="long"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onstarted
-//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onstarted arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 300
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onstarted M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CBOA
-
-setup({timeout: 300000});
-
-var adapter = null, t = async_test(document.title, {timeout: 300000}), discoverDevicesSuccessCB,
- stopDiscoverySuccess, discoverDevicesErrorCB, stopDiscoverySuccessCB;
-
-t.step(function () {
- discoverDevicesSuccessCB = {
- onstarted: t.step_func(function () {
- adapter.stopDiscovery(stopDiscoverySuccessCB);
- }),
- ondevicefound: t.step_func(function () {
- }),
- ondevicedisappeared: t.step_func(function () {
- }),
- onfinished: t.step_func(function () {
- })
- };
-
- stopDiscoverySuccessCB = t.step_func(function () {
- t.done();
- });
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothDiscoverDevicesSuccessCallback_onstarted</title>\r
+<meta charset="utf-8">\r
+<meta name="timeout" content="long"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothDiscoverDevicesSuccessCallback_onstarted\r
+//==== LABEL Check if BluetoothDiscoverDevicesSuccessCallback callback is called and if its onstarted arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 300\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothDiscoverDevicesSuccessCallback:onstarted M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CBOA\r
+\r
+setup({timeout: 300000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 300000}), discoverDevicesSuccessCB,\r
+ stopDiscoverySuccess, discoverDevicesErrorCB, stopDiscoverySuccessCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ discoverDevicesSuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ adapter.stopDiscovery(stopDiscoverySuccessCB);\r
+ }),\r
+ ondevicefound: t.step_func(function () {\r
+ }),\r
+ ondevicedisappeared: t.step_func(function () {\r
+ }),\r
+ onfinished: t.step_func(function () {\r
+ })\r
+ };\r
+\r
+ stopDiscoverySuccessCB = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ adapter.discoverDevices(discoverDevicesSuccessCB, discoverDevicesErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_addValueChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener
-//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method works properly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR MAST
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device, ReadValueSuccessCallback, watchID;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_type(watchID, "long", "addValueChangeListener should return type long");
- characteristic.removeValueChangeListener(watchID);
- device.disconnect();
- t.done();
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (bledevice) {
- if(bledevice.address == REMOTE_BLE_DEVICE_ADDRESS){
- device = bledevice;
- adapter.stopScan();
- device.connect(onconnected, onerror);
- }
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_addValueChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener\r
+//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method works properly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR MAST\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device, ReadValueSuccessCallback, watchID;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_type(watchID, "long", "addValueChangeListener should return type long");\r
+ characteristic.removeValueChangeListener(watchID);\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (bledevice) {\r
+ if(bledevice.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ device.connect(onconnected, onerror);\r
+ }\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_addValueChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, onconnected, onerror,
- service, characteristic, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_method_exists(characteristic, "addValueChangeListener");
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_addValueChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_addValueChangeListener_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::addValueChangeListener method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, onconnected, onerror,\r
+ service, characteristic, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_method_exists(characteristic, "addValueChangeListener");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_descriptors_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_descriptors_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::descriptors attribute exists, has type array and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false, origin;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");
- assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");
- origin = characteristic.descriptors[0];
- characteristic.descriptors[0] = "invalidValue";
- assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_descriptors_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_descriptors_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::descriptors attribute exists, has type array and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false, origin;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");\r
+ assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");\r
+ origin = characteristic.descriptors[0];\r
+ characteristic.descriptors[0] = "invalidValue";\r
+ assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_extend
-//==== LABEL Check if BluetoothGATTCharacteristic is extendable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_extensibility(characteristic);
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_extend\r
+//==== LABEL Check if BluetoothGATTCharacteristic is extendable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_extensibility(characteristic);\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_hasExtendedProperties_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_hasExtendedProperties_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::hasExtendedProperties attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_hasExtendedProperties_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_hasExtendedProperties_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::hasExtendedProperties attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isBroadcast_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isBroadcast_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isBroadcast attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isBroadcast_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isBroadcast_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isBroadcast attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isIndication_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isIndication_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isIndication attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, flag = false, device = null;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isIndication_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isIndication_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isIndication attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, flag = false, device = null;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isNotify_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isNotify_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isNotify attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isNotify_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isNotify_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isNotify attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isReadable_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isReadable_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isReadable attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isReadable_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isReadable_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isReadable attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isSignedWrite_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isSignedWrite_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isSignedWrite attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isSignedWrite_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isSignedWrite_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isSignedWrite attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isWritable_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isWritable_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isWritable attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isWritable_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isWritable_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isWritable attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_isWriteNoResponset_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_isWriteNoResponse_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::isWriteNoResponse attribute exists, has type boolean and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_isWriteNoResponset_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_isWriteNoResponse_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::isWriteNoResponse attribute exists, has type boolean and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_notexist
-//==== LABEL Check if is possible to call BluetoothGATTCharacteristic in new expresion
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U
-//==== SPEC_URL TBD
-//==== TEST_CRITERIA NIO
-
-test(function () {
- check_no_interface_object("BluetoothGATTCharacteristic");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_notexist\r
+//==== LABEL Check if is possible to call BluetoothGATTCharacteristic in new expresion\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U\r
+//==== SPEC_URL TBD\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+ check_no_interface_object("BluetoothGATTCharacteristic");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly without optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,
- onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, retVal, flag = false;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- device.disconnect();
- t.done();
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- var descFlag = false;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {
- retVal = characteristic.readValue(ReadValueSuccessCallback);
- descFlag = true;
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly without optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,\r
+ onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, retVal, flag = false;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ var descFlag = false;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {\r
+ retVal = characteristic.readValue(ReadValueSuccessCallback);\r
+ descFlag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called when device is not connected throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, ReadValueSuccessCallback;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("Method readValue shouldn't end successfully.");
- });
-
- bleScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
- adapter.stopScan();
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- assert_throws(INVALID_STATE_ERR, function () {
- characteristic.readValue(ReadValueSuccessCallback);
- }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");
- t.done();
- }
- }
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called when device is not connected throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, ReadValueSuccessCallback;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("Method readValue shouldn't end successfully.");\r
+ });\r
+\r
+ bleScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ adapter.stopScan();\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ assert_throws(INVALID_STATE_ERR, function () {\r
+ characteristic.readValue(ReadValueSuccessCallback);\r
+ }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");\r
+ t.done();\r
+ }\r
+ }\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, j,
- onconnected, onerror, service, characteristic, device = null, conversionTable, i, exceptionName, ReadValueSuccessCallback, errorCallback;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isReadable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.readValue(ReadValueSuccessCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, j,\r
+ onconnected, onerror, service, characteristic, device = null, conversionTable, i, exceptionName, ReadValueSuccessCallback, errorCallback;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isReadable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid error callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,
- onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, invaliderrorCallback;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("Method readValue shouldn't end successfully.");
- });
-
- invaliderrorCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid error callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,\r
+ onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, invaliderrorCallback;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("Method readValue shouldn't end successfully.");\r
+ });\r
+\r
+ invaliderrorCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- check_method_exists(characteristic, "readValue");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ check_method_exists(characteristic, "readValue");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_noarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_noarg
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called without argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.readValue();
- }, "TypeMismatchError" + " should be thrown - given no parameter.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_noarg\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called without argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.readValue();\r
+ }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,
- onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isReadable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.readValue(successCallback);
- }, "Given incorrect successCallback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,\r
+ onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isReadable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.readValue(successCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid success callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,
- onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, flag = false;
-
-t.step(function () {
- invalidSuccessCallback = {
- onread: t.step_func(function (values) {
- assert_unreached("Invalid successCallback invoked.");
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.readValue(invalidSuccessCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method throws exception when invalid success callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, i,\r
+ onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, flag = false;\r
+\r
+t.step(function () {\r
+ invalidSuccessCallback = {\r
+ onread: t.step_func(function (values) {\r
+ assert_unreached("Invalid successCallback invoked.");\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.readValue(invalidSuccessCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_readValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_readValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly with optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,
- onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, errorCallback, retVal, i, charFlag = false;
-
-t.step(function () {
- errorCallback = t.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- device.disconnect();
- t.done();
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true && charFlag == false) {
- charFlag = true;
- characteristic = service.characteristics[i];
- retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_readValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_readValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTCharacteristic::readValue method works properly with optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,\r
+ onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, errorCallback, retVal, i, charFlag = false;\r
+\r
+t.step(function () {\r
+ errorCallback = t.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true && charFlag == false) {\r
+ charFlag = true;\r
+ characteristic = service.characteristics[i];\r
+ retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_removeValueChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener
-//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method works properly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, watchID, retVal, flag = false, charFlag = false, i;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for (i = 0; i < service.characteristics.length; i++) {
- if (service.characteristics[i].isNotify == true && charFlag == false) {
- characteristic = service.characteristics[i];
- watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);
- retVal = characteristic.removeValueChangeListener(watchID);
- assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_removeValueChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener\r
+//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method works properly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, watchID, retVal, flag = false, charFlag = false, i;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ if (service.characteristics[i].isNotify == true && charFlag == false) {\r
+ characteristic = service.characteristics[i];\r
+ watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);\r
+ retVal = characteristic.removeValueChangeListener(watchID);\r
+ assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_removeValueChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_method_exists(characteristic, "removeValueChangeListener");
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_removeValueChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_removeValueChangeListener_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::removeValueChangeListener method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_method_exists(characteristic, "removeValueChangeListener");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2020 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:
- Feng Zhao <feng.zhao@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_uuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_uuid_attribute
-//==== LABEL Check if BluetoothGATTCharacteristic::uuid attribute exists, has type string and is readonly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:uuid A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "uuid", characteristic.uuid, "string", characteristic.uuid+"Tizen");
- device.disconnect();
- t.done();
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_uuid_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_uuid_attribute\r
+//==== LABEL Check if BluetoothGATTCharacteristic::uuid attribute exists, has type string and is readonly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:uuid A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({ timeout: 60000 });\r
+\r
+var t = async_test(document.title, { timeout: 60000 }), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT && LE_GATT_SUPPORT) { // check bluetooth and le and gatt support\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "uuid", characteristic.uuid, "string", characteristic.uuid + "Tizen");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly without optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, retVal, data = new Array(1, 2, 3, 4, 5, 6),
- flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- retVal = characteristic.writeValue(data);
- assert_equals(retVal, undefined, "writeValue should return undefined");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly without optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, retVal, data = new Array(1, 2, 3, 4, 5, 6),\r
+ flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ retVal = characteristic.writeValue(data);\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called when device is not connected throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, WriteValueSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);
-
-t.step(function () {
- WriteValueSuccessCallback = t.step_func(function () {
- assert_unreached("Method writeValue shouldn't end successfully.");
- });
-
- bleScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
- adapter.stopScan();
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- assert_throws(INVALID_STATE_ERR, function () {
- characteristic.writeValue(data, WriteValueSuccessCallback);
- }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");
- t.done();
- }
- }
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called when device is not connected throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, WriteValueSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);\r
+\r
+t.step(function () {\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully.");\r
+ });\r
+\r
+ bleScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ adapter.stopScan();\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ assert_throws(INVALID_STATE_ERR, function () {\r
+ characteristic.writeValue(data, WriteValueSuccessCallback);\r
+ }, INVALID_STATE_ERR + " should be thrown - if device is not connected.");\r
+ t.done();\r
+ }\r
+ }\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_data_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_data_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid data argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, incorrectData,
- WriteValueSuccessCallback, flag = false;
-
-t.step(function () {
- WriteValueSuccessCallback = t.step_func(function () {
- assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isWritable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("array", false);
- for (i = 0; i < conversionTable.length; i++) {
- incorrectData = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.writeValue(incorrectData, WriteValueSuccessCallback);
- }, "Given incorrect characteristic data.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_data_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_data_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid data argument throws an exception \r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, incorrectData,\r
+ WriteValueSuccessCallback, flag = false;\r
+\r
+t.step(function () {\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isWritable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("array", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ incorrectData = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.writeValue(incorrectData, WriteValueSuccessCallback);\r
+ }, "Given incorrect characteristic data.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, errorCallback,
- data = new Array(1, 2, 3, 4, 5, 6), WriteValueSuccessCallback, flag = false;
-
-t.step(function () {
- WriteValueSuccessCallback = t.step_func(function () {
- assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isWritable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid errorCallback argument throws an exception \r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, errorCallback,\r
+ data = new Array(1, 2, 3, 4, 5, 6), WriteValueSuccessCallback, flag = false;\r
+\r
+t.step(function () {\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isWritable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid error callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, WriteValueSuccessCallback,
- data = new Array(1, 2, 3, 4, 5, 6), invaliderrorCallback, flag = false, i;
-
-t.step(function () {
- WriteValueSuccessCallback = t.step_func(function () {
- assert_unreached("Method writeValue shouldn't end successfully.");
- });
-
- invaliderrorCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid error callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, WriteValueSuccessCallback, \r
+ data = new Array(1, 2, 3, 4, 5, 6), invaliderrorCallback, flag = false, i;\r
+\r
+t.step(function () {\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully.");\r
+ });\r
+\r
+ invaliderrorCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_exist
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- service, characteristic, onconnected, onerror, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- check_method_exists(characteristic, "writeValue");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_exist\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ service, characteristic, onconnected, onerror, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ check_method_exists(characteristic, "writeValue");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_noarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_noarg
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called without argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.writeValue();
- }, "TypeMismatchError" + " should be thrown - given no parameter.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_noarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_noarg\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called without argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.writeValue();\r
+ }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback,
- data = new Array(1, 2, 3, 4, 5, 6), flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isWritable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.writeValue(data, successCallback);
- }, "Given incorrect successCallback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ onconnected, onerror, service, characteristic, device = null, conversionTable, i, j, exceptionName, successCallback,\r
+ data = new Array(1, 2, 3, 4, 5, 6), flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isWritable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.writeValue(data, successCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid success callback is given
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,
- onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);
-
-t.step(function () {
- invalidSuccessCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Invalid successCallback invoked.");
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.writeValue(data, invalidSuccessCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method throws exception when invalid success callback is given\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false, i,\r
+ onconnected, onerror, service, characteristic, device = null, invalidSuccessCallback, data = new Array(1, 2, 3, 4, 5, 6);\r
+\r
+t.step(function () {\r
+ invalidSuccessCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Invalid successCallback invoked.");\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.writeValue(data, invalidSuccessCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothGATTCharacteristic_writeValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCharacteristic_writeValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly with optional argument
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR MAST
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,
- onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, WriteValueSuccessCallback, retVal,
- data = new Array(1, 2, 3, 4, 5, 6), WriteValueErrorCallback, i, charFlag = false;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_array_equals(value, data, "readValue returns wrong value");
- });
-
- WriteValueSuccessCallback = t.step_func(function () {
- assert_equals(retVal, undefined, "writeValue should return undefined");
- characteristic.readValue(ReadValueSuccessCallback);
- device.disconnect();
- t.done();
- });
-
- WriteValueErrorCallback = t.step_func(function (error) {
- assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true && charFlag == false) {
- charFlag = true;
- characteristic = service.characteristics[i];
- retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCharacteristic_writeValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCharacteristic_writeValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTCharacteristic::writeValue method works properly with optional argument\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR MAST\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback, flag = false,\r
+ onconnected, onerror, service, characteristic, device = null, ReadValueSuccessCallback, WriteValueSuccessCallback, retVal,\r
+ data = new Array(1, 2, 3, 4, 5, 6), WriteValueErrorCallback, i, charFlag = false;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_array_equals(value, data, "readValue returns wrong value");\r
+ });\r
+\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ characteristic.readValue(ReadValueSuccessCallback);\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ WriteValueErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true && charFlag == false) {\r
+ charFlag = true;\r
+ characteristic = service.characteristics[i];\r
+ retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Michal Bistyga <m.bistyga@samsung.com>
- Xiaoyan Qian <xy.qian@samsung.com>
- Qunfang Lin <qunfang.lin@samsung.com>
- Lei Tang <lei312.tang@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothGATTCombined</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTCombined
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MMINA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M
-//==== TEST_CRITERIA MOA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== TEST_CRITERIA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MMINA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M
-//==== TEST_CRITERIA MOA MR MAST
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MR MMINA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== TEST_CRITERIA MOA MR
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MR MMINA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:uuid A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), storedDevice, onConnected, onError, proccessDevice, adapter;
-
-t.step(function () {
- onConnected = t.step_func(function () {
-
- function sleep(ms) {
- var start = new Date().getTime();
- for (var i = 0; i < 1e7; i++) {
- if ((new Date().getTime() - start) > ms){
- break;
- }
- }
- }
- //BluetoothGATTCharacteristic_writeValue_with_errorCallback
- var inner3 = async_test("BluetoothGATTCharacteristic_writeValue_with_errorCallback", {timeout: 60000});
- inner3.step(function () {
- var value, data = new Array(1, 2, 3, 4, 5, 6), charFlag = false, retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
-
- var WriteValueSuccessCallback = inner3.step_func(function (value) {
- assert_equals(retVal, undefined, "writeValue should return undefined");
- inner3.done();
- });
-
- var WriteValueErrorCallback = inner3.step_func(function (error) {
- assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true && charFlag == false) {
- charFlag = true;
- characteristic = service.characteristics[i];
- retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
- }
- }
- }
- });
- sleep(2000)
-
- //BluetoothGATTCharacteristic_readValue
- var inner = async_test("BluetoothGATTCharacteristic_readValue", {timeout: 60000});
- inner.step(function () {
- var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
- ReadValueSuccessCallback = inner.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- inner.done();
- });
-
- var descFlag = false;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- var characteristic = service.characteristics[i];
- if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {
- retVal = characteristic.readValue(ReadValueSuccessCallback);
- descFlag = true;
- }
- };
- });
- sleep(2000)
-
- //BluetoothGATTCharacteristic_readValue_with_errorCallback
- var inner2 = async_test("BluetoothGATTCharacteristic_readValue_with_errorCallback", {timeout: 60000});
- inner2.step(function () {
-
- var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
- errorCallback = inner2.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- ReadValueSuccessCallback = inner2.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- inner2.done();
- });
-
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- var charFlag=false;
- for(i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if(charFlag == false && characteristic != undefined && characteristic.isReadable == true) {
- charFlag = true;
- retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);
- }
- }
- }
- });
- sleep(2000)
-
- //BluetoothGATTDescriptor_readValue
- var inner4 = async_test("BluetoothGATTDescriptor_readValue", {timeout: 60000});
- inner4.step(function () {
- var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
- ReadValueSuccessCallback = inner4.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- inner4.done();
- });
-
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- retVal = descriptor.readValue(ReadValueSuccessCallback);
- }
- }
- }
- });
- sleep(2000)
-
- //BluetoothGATTDescriptor_readValue_with_errorCallback
- var inner5 = async_test("BluetoothGATTDescriptor_readValue_with_errorCallback", {timeout: 60000});
- inner5.step(function () {
- var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
- ReadValueSuccessCallback = inner5.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- inner5.done();
- });
- ReadValueErrorCallback = inner5.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- var service = storedDevice.getService(storedDevice.uuids[0]);
- var descFlag = false;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descFlag == false && descriptor != undefined) {
- descFlag = true;
- retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- }
- }
- }
- });
- sleep(2000)
-
- //ReadValueSuccessCallback_onread
- var inner6 = async_test("ReadValueSuccessCallback_onread", {timeout: 60000});
- inner6.step(function () {
- var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
- ReadValueSuccessCallback = inner6.step_func(function (value) {
- assert_type(value, "array", "foundDevice isn't an array");
- inner6.done();
- });
- ReadValueErrorCallback = inner6.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
- var service = storedDevice.getService(storedDevice.uuids[0]);
- var descFlag =false;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (descFlag==false && characteristic != undefined) {
- characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- descFlag = true;
- }
- }
- });
- sleep(2000)
-
- // BluetoothGATTCharacteristic_addValueChangeListener_exist
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_method_exists(characteristic, "addValueChangeListener");
- };
- }, "BluetoothGATTCharacteristic_addValueChangeListener_exist");
-
- // BluetoothGATTCharacteristic_descriptors_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");
- assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");
- origin = characteristic.descriptors[0];
- characteristic.descriptors[0] = "invalidValue";
- assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");
- };
- }, "BluetoothGATTCharacteristic_descriptors_attribute");
-
- //BluetoothGATTCharacteristic_hasExtendedProperties_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));
- };
- }, "BluetoothGATTCharacteristic_hasExtendedProperties_attribute");
-
- //BluetoothGATTCharacteristic_isBroadcast_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));
- };
- }, "BluetoothGATTCharacteristic_isBroadcast_attribute");
-
- //BluetoothGATTCharacteristic_isIndication_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));
- };
- }, "BluetoothGATTCharacteristic_isIndication_attribute");
-
- //BluetoothGATTCharacteristic_isNotify_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));
- };
- }, "BluetoothGATTCharacteristic_isNotify_attribute");
-
- //BluetoothGATTCharacteristic_isReadable_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));
- };
- }, "BluetoothGATTCharacteristic_isReadable_attribute");
-
- //BluetoothGATTCharacteristic_isSignedWrite_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));
- };
- }, "BluetoothGATTCharacteristic_isSignedWrite_attribute");
-
- //BluetoothGATTCharacteristic_isWritable_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));
- };
- }, "BluetoothGATTCharacteristic_isWritable_attribute");
-
- //BluetoothGATTCharacteristic_isWriteNoResponse_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));
- };
- }, "BluetoothGATTCharacteristic_isWriteNoResponse_attribute");
-
- //BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch
- test(function () {
- var errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;
- ReadValueSuccessCallback = function (value) {
- assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isReadable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- characteristic.readValue(ReadValueSuccessCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- }
- }
- };
- }, "BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch");
-
- //BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb
- test(function () {
- var characteristic, descriptor, i, j, conversionTable, exceptionName;
- var ReadValueSuccessCallback = function (value) {
- assert_unreached("Method readValue shouldn't end successfully.");
- };
-
- var invaliderrorCallback = {
- onerror: function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- }
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb");
-
- //BluetoothGATTCharacteristic_readValue_exist
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- check_method_exists(characteristic, "readValue");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_readValue_exist");
-
- //BluetoothGATTCharacteristic_readValue_noarg
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.readValue();
- }, "TypeMismatchError" + " should be thrown - given no parameter.");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_readValue_noarg");
-
- //BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isReadable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for (i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- characteristic.readValue(successCallback);
- }, "Given incorrect successCallback.");
- }
- }
- }
- };
- }, "BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch");
-
- //BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb
- test(function () {
- var characteristic, descriptor, i, j, conversionTable, exceptionName;
- invalidSuccessCallback = {
- onread: function (values) {
- assert_unreached("Invalid successCallback invoked.");
- }
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isReadable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.readValue(invalidSuccessCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb");
-
- //BluetoothGATTCharacteristic_removeValueChangeListener
- test(function () {
- var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var ReadValueSuccessCallback = function (value) {
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for (i = 0; i < service.characteristics.length; i++) {
- if (service.characteristics[i].isNotify == true) {
- characteristic = service.characteristics[i];
- watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);
- retVal = characteristic.removeValueChangeListener(watchID);
- assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_removeValueChangeListener");
-
- //BluetoothGATTCharacteristic_removeValueChangeListener_exist
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_method_exists(characteristic, "removeValueChangeListener");
- };
- }, "BluetoothGATTCharacteristic_removeValueChangeListener_exist");
-
- //BluetoothGATTCharacteristic_writeValue
- test(function () {
- var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var data = data = new Array(1, 2, 3, 4, 5, 6);
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- retVal = characteristic.writeValue(data);
- assert_equals(retVal, undefined, "writeValue should return undefined");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue");
-
- //BluetoothGATTCharacteristic_writeValue_data_TypeMismatch
- test(function () {
- var WriteValueSuccessCallback, incorrectData, characteristic, descriptor, i, j, conversionTable, exceptionName;
- WriteValueSuccessCallback = function () {
- assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isWritable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("array", false);
- for (i = 0; i < conversionTable.length; i++) {
- incorrectData = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.writeValue(incorrectData, WriteValueSuccessCallback);
- }, "Given incorrect characteristic data.");
- }
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_data_TypeMismatch");
-
- //BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch
- test(function () {
- var characteristic, descriptor, i, j, conversionTable, exceptionName;
- var WriteValueSuccessCallback = function () {
- assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");
- };
-
- var data = new Array(1, 2, 3, 4, 5, 6)
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isWritable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- var errorCallback = conversionTable[i][0];
- var exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch");
-
- //BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb
- test(function () {
- var WriteValueSuccessCallback, invaliderrorCallback, data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;
- WriteValueSuccessCallback = function () {
- assert_unreached("Method writeValue shouldn't end successfully.");
- };
-
- invaliderrorCallback = {
- onerror: function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- }
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid error callback.");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb");
-
- //BluetoothGATTCharacteristic_writeValue_exist
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- check_method_exists(characteristic, "writeValue");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_exist");
-
- //BluetoothGATTCharacteristic_writeValue_noarg
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.writeValue();
- }, "TypeMismatchError" + " should be thrown - given no parameter.");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_noarg");
-
- //BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch
- test(function () {
- var data = new Array(1, 2, 3, 4, 5, 6), successCallback, exceptionName, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(j = 0; j < service.characteristics.length; j++) {
- if(service.characteristics[j].isWritable == true) {
- characteristic = service.characteristics[j];
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- characteristic.writeValue(data, successCallback);
- }, "Given incorrect successCallback.");
- }
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch");
-
- //BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb
- test(function () {
- var characteristic, descriptor, i, j, conversionTable, exceptionName;
- var invalidSuccessCallback = {
- onsuccess: function() {
- assert_unreached("Invalid successCallback invoked.");
- }
- }
- var data = new Array(1, 2, 3, 4, 5, 6);
- var service = storedDevice.getService(storedDevice.uuids[0]);
- if (service.characteristics.length > 0) {
- for(i = 0; i < service.characteristics.length; i++) {
- if(service.characteristics[i].isWritable == true) {
- characteristic = service.characteristics[i];
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- characteristic.writeValue(data, invalidSuccessCallback);
- }, "TypeMismatchError" + " should be thrown - given invalid success callback.");
- }
- }
- };
- }, "BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb");
-
-
-
- //BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch
- test(function () {
- var conversionTable = getTypeConversionExceptions("functionObject", true), characteristic, descriptor, i, j, conversionTable, exceptionName;
-
- var ReadValueSuccessCallback = function (value) {
- assert_unreached("readValue() success callback should not be invoked.");
- };
-
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- var characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- var descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- ReadValueErrorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- }, "Given incorrect error callback.");
- }
- }
- }
- }
- }, "BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch");
-
- //BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb
- test(function () {
- var characteristic, descriptor, i, j, conversionTable, exceptionName;
- var ReadValueSuccessCallback = function (value) {
- assert_unreached("readValue() success callback should not be invoked.");
- };
-
- var incorrectCallback = {
- onerror: function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- }
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- }
- }
- }
- }, "BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb");
-
- //BluetoothGATTDescriptor_readValue_exist
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_method_exists(descriptor, "readValue");
- }
- }
- }
- }, "BluetoothGATTDescriptor_readValue_exist");
-
- //BluetoothGATTDescriptor_readValue_misarg
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.readValue();
- }, "Invoked with missing non-optional arguments.");
- }
- }
- }
- }, "BluetoothGATTDescriptor_readValue_misarg");
-
- //BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- var ReadValueSuccessCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.readValue(ReadValueSuccessCallback);
- }, "Given incorrect success callback.");
- }
- }
- }
- };
- }, "BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch");
-
- //BluetoothGATTDescriptor_readValue_successCallback_invalid_cb
- test(function () {
- var characteristic, descriptor, i, j, conversionTable, exceptionName;
- var incorrectCallback = {
- onread: function (value) {
- assert_unreached("Invalid successcallback invoked");
- }
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.readValue(incorrectCallback);
- }, "Given incorrect successCallback.");
- }
- }
- }
- }, "BluetoothGATTDescriptor_readValue_successCallback_invalid_cb");
-
- //BluetoothGATTDescriptor_writeValue
- test(function () {
- var data = new Array(1, 2, 3, 4, 5, 6), retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- retVal = descriptor.writeValue(data);
- assert_equals(retVal, undefined, "writeValue should return undefined");
- }
- }
- };
- }, "BluetoothGATTDescriptor_writeValue");
-
- //BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch
- test(function () {
- var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;
- var conversionTable = getTypeConversionExceptions("functionObject", true);
- var WriteValueSuccessCallback = function (value) {
- assert_unreached("writeValue() success callback should not be invoked.");
- };
- var WriteValueErrorCallback;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- WriteValueErrorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
- }, "Given incorrect error callback.");
- }
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch");
-
- //BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb
- test(function () {
- var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;
- var WriteValueSuccessCallback = function () {
- assert_unreached("writeValue() success callback should not be invoked.");
- };
-
- var incorrectCallback = {
- onerror: function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- }
- };
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb");
-
- //BluetoothGATTDescriptor_writeValue_exist
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_method_exists(descriptor, "writeValue");
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_exist");
- //BluetoothGATTDescriptor_writeValue_misarg
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.writeValue();
- }, "Invoked with missing non-optional arguments.");
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_misarg");
-
- //BluetoothGATTDescriptor_writeValue_value_TypeMismatch
- test(function () {
- var data, characteristic, descriptor, i, j, exceptionName;
- var conversionTable = getTypeConversionExceptions("array", true);
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- data = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.writeValue(data);
- }, "Given incorrect value.");
- }
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_value_TypeMismatch");
-
-
- //BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch
- test(function () {
- var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for (j = 0; j < service.characteristics.length; j++) {
- var characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- var descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- var WriteValueSuccessCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.writeValue(data, WriteValueSuccessCallback);
- }, "Given incorrect success callback.");
- }
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch");
-
-
- //BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb
- test(function () {
- incorrectCallback = {
- onsuccess: function () {
- assert_unreached("Invalid successcallback invoked");
- }
- };
- var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- var characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- var descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.writeValue(data, incorrectCallback);
- }, "Given incorrect successCallback.");
- break;
- }
- }
- }
- }, "BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb");
-
-
- //BluetoothGATTService_characteristics_attribute
- test(function () {
- var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");
- assert_type(service.characteristics, "array", "characteristics should be an array");
- service.characteristics = tmp;
- assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");
- }, "BluetoothGATTService_characteristics_attribute");
-
- //BluetoothGATTService_serviceUuid_attribute
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid+"Tizen");
- }, "BluetoothGATTService_serviceUuid_attribute");
-
- //BluetoothGATTService_services_attribute
- test(function () {
- var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;
- var service = storedDevice.getService(storedDevice.uuids[0]);
- assert_own_property(service, "services", "BluetoothGATTService does not own services property.");
- assert_type(service.services, "array", "services should be an array");
- service.services = tmp;
- assert_not_equals(service.services, tmp, "services should not be modified");
- }, "BluetoothGATTService_services_attribute");
-
-
- // All "*extend" tests should be at the end of package. There are only
- // tests which can affect tests (though they do not - but if new tests
- // will be added, they should go before these)
-
- setTimeout(function(){
- //BluetoothGATTDescriptor_extend
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_extensibility(descriptor);
- }
- }
- }
- }, "BluetoothGATTDescriptor_extend");
-
- //BluetoothGATTCharacteristic_extend
- test(function () {
- var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- check_extensibility(characteristic);
- };
- }, "BluetoothGATTCharacteristic_extend");
-
- storedDevice.disconnect();
- t.done();}
- , 5000);
- });
- onError = t.step_func(function (e) {
- var errorMessage = "Failed to connect to device: " + e.message + "; try again";
- assert_unreached(errorMessage);
- })
-
- proccessDevice = t.step_func(function (device)
- {
- adapter.stopScan();
- device.connect(onConnected, onError);
- })
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(function onsuccess(device) {
- if (device.address == REMOTE_BLE_DEVICE_ADDRESS)
- {
- console.log("Found device: " + device.name);
- storedDevice=device;
- proccessDevice(storedDevice);
- }
- });
-});
-
-
-
-
-
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Michal Bistyga <m.bistyga@samsung.com>\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+ Lei Tang <lei312.tang@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTCombined</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTCombined\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:addValueChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:descriptors A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:BluetoothGATTCharacteristic U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:hasExtendedProperties A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isBroadcast A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isIndication A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isNotify A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isReadable A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isSignedWrite A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWritable A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:isWriteNoResponse A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MMINA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:readValue M\r
+//==== TEST_CRITERIA MOA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== TEST_CRITERIA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:removeValueChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MMINA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTCharacteristic:writeValue M\r
+//==== TEST_CRITERIA MOA MR MAST\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MR MMINA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== TEST_CRITERIA MOA MR\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MR MMINA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:uuid A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), storedDevice, onConnected, onError, proccessDevice, adapter;\r
+\r
+t.step(function () {\r
+ onConnected = t.step_func(function () {\r
+\r
+ function sleep(ms) {\r
+ var start = new Date().getTime();\r
+ for (var i = 0; i < 1e7; i++) {\r
+ if ((new Date().getTime() - start) > ms){\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ //BluetoothGATTCharacteristic_writeValue_with_errorCallback\r
+ var inner3 = async_test("BluetoothGATTCharacteristic_writeValue_with_errorCallback", {timeout: 60000});\r
+ inner3.step(function () {\r
+ var value, data = new Array(1, 2, 3, 4, 5, 6), charFlag = false, retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+\r
+ var WriteValueSuccessCallback = inner3.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ inner3.done();\r
+ });\r
+\r
+ var WriteValueErrorCallback = inner3.step_func(function (error) {\r
+ assert_unreached("writeValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true && charFlag == false) {\r
+ charFlag = true;\r
+ characteristic = service.characteristics[i];\r
+ retVal = characteristic.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+ sleep(2000)\r
+\r
+ //BluetoothGATTCharacteristic_readValue\r
+ var inner = async_test("BluetoothGATTCharacteristic_readValue", {timeout: 60000});\r
+ inner.step(function () {\r
+ var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ ReadValueSuccessCallback = inner.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ inner.done();\r
+ });\r
+\r
+ var descFlag = false;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ var characteristic = service.characteristics[i];\r
+ if (descFlag == false && characteristic != undefined && characteristic.isReadable == true) {\r
+ retVal = characteristic.readValue(ReadValueSuccessCallback);\r
+ descFlag = true;\r
+ }\r
+ };\r
+ });\r
+ sleep(2000)\r
+\r
+ //BluetoothGATTCharacteristic_readValue_with_errorCallback\r
+ var inner2 = async_test("BluetoothGATTCharacteristic_readValue_with_errorCallback", {timeout: 60000});\r
+ inner2.step(function () {\r
+\r
+ var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ errorCallback = inner2.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ ReadValueSuccessCallback = inner2.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ inner2.done();\r
+ });\r
+\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ var charFlag=false;\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if(charFlag == false && characteristic != undefined && characteristic.isReadable == true) {\r
+ charFlag = true;\r
+ retVal = characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+ sleep(2000)\r
+\r
+ //BluetoothGATTDescriptor_readValue\r
+ var inner4 = async_test("BluetoothGATTDescriptor_readValue", {timeout: 60000});\r
+ inner4.step(function () {\r
+ var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ ReadValueSuccessCallback = inner4.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ inner4.done();\r
+ });\r
+\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ retVal = descriptor.readValue(ReadValueSuccessCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+ sleep(2000)\r
+\r
+ //BluetoothGATTDescriptor_readValue_with_errorCallback\r
+ var inner5 = async_test("BluetoothGATTDescriptor_readValue_with_errorCallback", {timeout: 60000});\r
+ inner5.step(function () {\r
+ var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ ReadValueSuccessCallback = inner5.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ inner5.done();\r
+ });\r
+ ReadValueErrorCallback = inner5.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ var descFlag = false;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descFlag == false && descriptor != undefined) {\r
+ descFlag = true;\r
+ retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+ sleep(2000)\r
+\r
+ //ReadValueSuccessCallback_onread\r
+ var inner6 = async_test("ReadValueSuccessCallback_onread", {timeout: 60000});\r
+ inner6.step(function () {\r
+ var retVal, errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ ReadValueSuccessCallback = inner6.step_func(function (value) {\r
+ assert_type(value, "array", "foundDevice isn't an array");\r
+ inner6.done();\r
+ });\r
+ ReadValueErrorCallback = inner6.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ var descFlag =false;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (descFlag==false && characteristic != undefined) {\r
+ characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ descFlag = true;\r
+ }\r
+ }\r
+ });\r
+ sleep(2000)\r
+\r
+ // BluetoothGATTCharacteristic_addValueChangeListener_exist\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_method_exists(characteristic, "addValueChangeListener");\r
+ };\r
+ }, "BluetoothGATTCharacteristic_addValueChangeListener_exist");\r
+\r
+ // BluetoothGATTCharacteristic_descriptors_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ assert_true("descriptors" in characteristic, "Name descriptors doesn't exist in provided object.");\r
+ assert_type(characteristic.descriptors, "array", "Type of descriptors is different.");\r
+ origin = characteristic.descriptors[0];\r
+ characteristic.descriptors[0] = "invalidValue";\r
+ assert_equals(characteristic.descriptors[0], origin, "descriptor is readonly, but its writable.");\r
+ };\r
+ }, "BluetoothGATTCharacteristic_descriptors_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_hasExtendedProperties_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "hasExtendedProperties", characteristic.hasExtendedProperties, "boolean", !(characteristic.hasExtendedProperties));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_hasExtendedProperties_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isBroadcast_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isBroadcast", characteristic.isBroadcast, "boolean", !(characteristic.isBroadcast));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isBroadcast_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isIndication_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isIndication", characteristic.isIndication, "boolean", !(characteristic.isIndication));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isIndication_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isNotify_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isNotify", characteristic.isNotify, "boolean", !(characteristic.isNotify));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isNotify_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isReadable_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isReadable", characteristic.isReadable, "boolean", !(characteristic.isReadable));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isReadable_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isSignedWrite_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isSignedWrite", characteristic.isSignedWrite, "boolean", !(characteristic.isSignedWrite));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isSignedWrite_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isWritable_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isWritable", characteristic.isWritable, "boolean", !(characteristic.isWritable));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isWritable_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_isWriteNoResponse_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_readonly(characteristic, "isWriteNoResponse", characteristic.isWriteNoResponse, "boolean", !(characteristic.isWriteNoResponse));\r
+ };\r
+ }, "BluetoothGATTCharacteristic_isWriteNoResponse_attribute");\r
+\r
+ //BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch\r
+ test(function () {\r
+ var errorCallback, ReadValueSuccessCallback, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ ReadValueSuccessCallback = function (value) {\r
+ assert_unreached("Method readValue shouldn't end successfully. Given incorrect errorCallback.");\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isReadable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.readValue(ReadValueSuccessCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_readValue_errorCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb\r
+ test(function () {\r
+ var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var ReadValueSuccessCallback = function (value) {\r
+ assert_unreached("Method readValue shouldn't end successfully.");\r
+ };\r
+\r
+ var invaliderrorCallback = {\r
+ onerror: function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ }\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.readValue(ReadValueSuccessCallback, invaliderrorCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_readValue_errorCallback_invalid_cb");\r
+\r
+ //BluetoothGATTCharacteristic_readValue_exist\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ check_method_exists(characteristic, "readValue");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_readValue_exist");\r
+\r
+ //BluetoothGATTCharacteristic_readValue_noarg\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.readValue();\r
+ }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_readValue_noarg");\r
+\r
+ //BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isReadable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.readValue(successCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_readValue_successCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb\r
+ test(function () {\r
+ var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ invalidSuccessCallback = {\r
+ onread: function (values) {\r
+ assert_unreached("Invalid successCallback invoked.");\r
+ }\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isReadable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.readValue(invalidSuccessCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_readValue_successCallback_invalid_cb");\r
+\r
+ //BluetoothGATTCharacteristic_removeValueChangeListener\r
+ test(function () {\r
+ var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var ReadValueSuccessCallback = function (value) {\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ if (service.characteristics[i].isNotify == true) {\r
+ characteristic = service.characteristics[i];\r
+ watchID = characteristic.addValueChangeListener(ReadValueSuccessCallback);\r
+ retVal = characteristic.removeValueChangeListener(watchID);\r
+ assert_equals(retVal, undefined, "removeValueChangeListener returns wrong value");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_removeValueChangeListener");\r
+\r
+ //BluetoothGATTCharacteristic_removeValueChangeListener_exist\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_method_exists(characteristic, "removeValueChangeListener");\r
+ };\r
+ }, "BluetoothGATTCharacteristic_removeValueChangeListener_exist");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue\r
+ test(function () {\r
+ var retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var data = data = new Array(1, 2, 3, 4, 5, 6);\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ retVal = characteristic.writeValue(data);\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_data_TypeMismatch\r
+ test(function () {\r
+ var WriteValueSuccessCallback, incorrectData, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ WriteValueSuccessCallback = function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully. Given incorrect data.");\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isWritable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("array", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ incorrectData = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.writeValue(incorrectData, WriteValueSuccessCallback);\r
+ }, "Given incorrect characteristic data.");\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_data_TypeMismatch");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch\r
+ test(function () {\r
+ var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var WriteValueSuccessCallback = function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully. Given incorrect errorCallback.");\r
+ };\r
+\r
+ var data = new Array(1, 2, 3, 4, 5, 6)\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isWritable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ var errorCallback = conversionTable[i][0];\r
+ var exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.writeValue(data, WriteValueSuccessCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_errorCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb\r
+ test(function () {\r
+ var WriteValueSuccessCallback, invaliderrorCallback, data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ WriteValueSuccessCallback = function () {\r
+ assert_unreached("Method writeValue shouldn't end successfully.");\r
+ };\r
+\r
+ invaliderrorCallback = {\r
+ onerror: function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ }\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.writeValue(data, WriteValueSuccessCallback, invaliderrorCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid error callback.");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_errorCallback_invalid_cb");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_exist\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ check_method_exists(characteristic, "writeValue");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_exist");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_noarg\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.writeValue();\r
+ }, "TypeMismatchError" + " should be thrown - given no parameter.");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_noarg");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch\r
+ test(function () {\r
+ var data = new Array(1, 2, 3, 4, 5, 6), successCallback, exceptionName, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(j = 0; j < service.characteristics.length; j++) {\r
+ if(service.characteristics[j].isWritable == true) {\r
+ characteristic = service.characteristics[j];\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ characteristic.writeValue(data, successCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_successCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb\r
+ test(function () {\r
+ var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var invalidSuccessCallback = {\r
+ onsuccess: function() {\r
+ assert_unreached("Invalid successCallback invoked.");\r
+ }\r
+ }\r
+ var data = new Array(1, 2, 3, 4, 5, 6);\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ for(i = 0; i < service.characteristics.length; i++) {\r
+ if(service.characteristics[i].isWritable == true) {\r
+ characteristic = service.characteristics[i];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ characteristic.writeValue(data, invalidSuccessCallback);\r
+ }, "TypeMismatchError" + " should be thrown - given invalid success callback.");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTCharacteristic_writeValue_successCallback_invalid_cb");\r
+\r
+\r
+\r
+ //BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch\r
+ test(function () {\r
+ var conversionTable = getTypeConversionExceptions("functionObject", true), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+\r
+ var ReadValueSuccessCallback = function (value) {\r
+ assert_unreached("readValue() success callback should not be invoked.");\r
+ };\r
+\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ var characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ var descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ ReadValueErrorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ }, "Given incorrect error callback.");\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb\r
+ test(function () {\r
+ var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var ReadValueSuccessCallback = function (value) {\r
+ assert_unreached("readValue() success callback should not be invoked.");\r
+ };\r
+\r
+ var incorrectCallback = {\r
+ onerror: function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ }\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb");\r
+\r
+ //BluetoothGATTDescriptor_readValue_exist\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_method_exists(descriptor, "readValue");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_readValue_exist");\r
+\r
+ //BluetoothGATTDescriptor_readValue_misarg\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.readValue();\r
+ }, "Invoked with missing non-optional arguments.");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_readValue_misarg");\r
+\r
+ //BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ var ReadValueSuccessCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.readValue(ReadValueSuccessCallback);\r
+ }, "Given incorrect success callback.");\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTDescriptor_readValue_successCallback_invalid_cb\r
+ test(function () {\r
+ var characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var incorrectCallback = {\r
+ onread: function (value) {\r
+ assert_unreached("Invalid successcallback invoked");\r
+ }\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.readValue(incorrectCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_readValue_successCallback_invalid_cb");\r
+\r
+ //BluetoothGATTDescriptor_writeValue\r
+ test(function () {\r
+ var data = new Array(1, 2, 3, 4, 5, 6), retVal, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ retVal = descriptor.writeValue(data);\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ }\r
+ }\r
+ };\r
+ }, "BluetoothGATTDescriptor_writeValue");\r
+\r
+ //BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch\r
+ test(function () {\r
+ var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ var WriteValueSuccessCallback = function (value) {\r
+ assert_unreached("writeValue() success callback should not be invoked.");\r
+ };\r
+ var WriteValueErrorCallback;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ WriteValueErrorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+ }, "Given incorrect error callback.");\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch");\r
+\r
+ //BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb\r
+ test(function () {\r
+ var data = new Array(1, 2, 3, 4, 5, 6), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var WriteValueSuccessCallback = function () {\r
+ assert_unreached("writeValue() success callback should not be invoked.");\r
+ };\r
+\r
+ var incorrectCallback = {\r
+ onerror: function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ }\r
+ };\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb");\r
+\r
+ //BluetoothGATTDescriptor_writeValue_exist\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_method_exists(descriptor, "writeValue");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_exist");\r
+ //BluetoothGATTDescriptor_writeValue_misarg\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.writeValue();\r
+ }, "Invoked with missing non-optional arguments.");\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_misarg");\r
+\r
+ //BluetoothGATTDescriptor_writeValue_value_TypeMismatch\r
+ test(function () {\r
+ var data, characteristic, descriptor, i, j, exceptionName;\r
+ var conversionTable = getTypeConversionExceptions("array", true);\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ data = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.writeValue(data);\r
+ }, "Given incorrect value.");\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_value_TypeMismatch");\r
+\r
+\r
+ //BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch\r
+ test(function () {\r
+ var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ var characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ var descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ var WriteValueSuccessCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback);\r
+ }, "Given incorrect success callback.");\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch");\r
+\r
+\r
+ //BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb\r
+ test(function () {\r
+ incorrectCallback = {\r
+ onsuccess: function () {\r
+ assert_unreached("Invalid successcallback invoked");\r
+ }\r
+ };\r
+ var data = new Array(1, 2, 3, 4, 5, 6), i, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ var characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ var descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.writeValue(data, incorrectCallback);\r
+ }, "Given incorrect successCallback.");\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb");\r
+\r
+\r
+ //BluetoothGATTService_characteristics_attribute\r
+ test(function () {\r
+ var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");\r
+ assert_type(service.characteristics, "array", "characteristics should be an array");\r
+ service.characteristics = tmp;\r
+ assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");\r
+ }, "BluetoothGATTService_characteristics_attribute");\r
+\r
+ //BluetoothGATTService_serviceUuid_attribute\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid+"Tizen");\r
+ }, "BluetoothGATTService_serviceUuid_attribute");\r
+\r
+ //BluetoothGATTService_services_attribute\r
+ test(function () {\r
+ var tmp, characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ var service = storedDevice.getService(storedDevice.uuids[0]);\r
+ assert_own_property(service, "services", "BluetoothGATTService does not own services property.");\r
+ assert_type(service.services, "array", "services should be an array");\r
+ service.services = tmp;\r
+ assert_not_equals(service.services, tmp, "services should not be modified");\r
+ }, "BluetoothGATTService_services_attribute");\r
+\r
+\r
+ // All "*extend" tests should be at the end of package. There are only\r
+ // tests which can affect tests (though they do not - but if new tests\r
+ // will be added, they should go before these)\r
+\r
+ setTimeout(function(){\r
+ //BluetoothGATTDescriptor_extend\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_extensibility(descriptor);\r
+ }\r
+ }\r
+ }\r
+ }, "BluetoothGATTDescriptor_extend");\r
+\r
+ //BluetoothGATTCharacteristic_extend\r
+ test(function () {\r
+ var service = storedDevice.getService(storedDevice.uuids[0]), characteristic, descriptor, i, j, conversionTable, exceptionName;\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ check_extensibility(characteristic);\r
+ };\r
+ }, "BluetoothGATTCharacteristic_extend");\r
+\r
+ storedDevice.disconnect();\r
+ t.done();}\r
+ , 5000);\r
+ });\r
+ onError = t.step_func(function (e) {\r
+ var errorMessage = "Failed to connect to device: " + e.message + "; try again";\r
+ assert_unreached(errorMessage);\r
+ })\r
+\r
+ proccessDevice = t.step_func(function (device)\r
+ {\r
+ adapter.stopScan();\r
+ device.connect(onConnected, onError);\r
+ })\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(function onsuccess(device) {\r
+ if (device.address == REMOTE_BLE_DEVICE_ADDRESS)\r
+ {\r
+ console.log("Found device: " + device.name);\r
+ storedDevice=device;\r
+ proccessDevice(storedDevice);\r
+ }\r
+ });\r
+});\r
+\r
+\r
+\r
+\r
+\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_extend
-//==== LABEL Check if BluetoothGATTDescriptor can have new properties added
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_extensibility(descriptor);
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_extend\r
+//==== LABEL Check if BluetoothGATTDescriptor can have new properties added\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_extensibility(descriptor);\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_notexist
-//==== LABEL Check if interface BluetoothGATTDescriptor exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA NIO
-
-test(function () {
- check_no_interface_object("BluetoothGATTDescriptor");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_notexist\r
+//==== LABEL Check if interface BluetoothGATTDescriptor exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:BluetoothGATTDescriptor U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+ check_no_interface_object("BluetoothGATTDescriptor");\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue
-//==== LABEL Check if BluetoothGATTDescriptor readValue method without optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR MMINA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, retVal = null, device = null, flag = false, i;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- device.disconnect();
- t.done();
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- retVal = descriptor.readValue(ReadValueSuccessCallback);
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue\r
+//==== LABEL Check if BluetoothGATTDescriptor readValue method without optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, retVal = null, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ retVal = descriptor.readValue(ReadValueSuccessCallback);\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTDescriptor readValue method throw exception when device is not connected
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
- characteristic, descriptor, ReadValueSuccessCallback, device;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("readValue() success callback was invoked");
- });
-
- BbLEScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
-
- ondevicefound: t.step_func(function (foundDevice) {
- device = foundDevice;
- if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
- adapter.stopScan();
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- descriptor = characteristic.descriptors[0];
- assert_throws(INVALID_STATE_ERR, function () {
- descriptor.readValue(ReadValueSuccessCallback);
- }, "Should throw exception when device is not connected");
- t.done();
- }
- }
- }),
-
- onfinished: t.step_func(function (devices) {
- })
- };
-
- BbLEScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTDescriptor readValue method throw exception when device is not connected\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+ characteristic, descriptor, ReadValueSuccessCallback, device;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("readValue() success callback was invoked");\r
+ });\r
+\r
+ BbLEScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+\r
+ ondevicefound: t.step_func(function (foundDevice) {\r
+ device = foundDevice;\r
+ if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ adapter.stopScan();\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ descriptor = characteristic.descriptors[0];\r
+ assert_throws(INVALID_STATE_ERR, function () {\r
+ descriptor.readValue(ReadValueSuccessCallback);\r
+ }, "Should throw exception when device is not connected");\r
+ t.done();\r
+ }\r
+ }\r
+ }),\r
+\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ BbLEScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch
-//==== LABEL Check if readValue throws exception when errorCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service, device = null, flag = false,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, conversionTable, exceptionName, i, j;
-
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("readValue() success callback should not be invoked.");
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- ReadValueErrorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- }, "Given incorrect error callback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if readValue throws exception when errorCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service, device = null, flag = false,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, conversionTable, exceptionName, i, j;\r
+\r
+t.step(function () {\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("readValue() success callback should not be invoked.");\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ ReadValueErrorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ }, "Given incorrect error callback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb
-//==== LABEL Check if readValue throws exception when errorCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, incorrectCallback, device = null, flag = false, i;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("readValue() success callback should not be invoked.");
- });
-
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_errorCallback_invalid_cb\r
+//==== LABEL Check if readValue throws exception when errorCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, incorrectCallback, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("readValue() success callback should not be invoked.");\r
+ });\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.readValue(ReadValueSuccessCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_exist
-//==== LABEL Check if readValue exists
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_method_exists(descriptor, "readValue");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_exist\r
+//==== LABEL Check if readValue exists\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_method_exists(descriptor, "readValue");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_misarg
-//==== LABEL Check if readValue method called with missing non-optional argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.readValue();
- }, "Invoked with missing non-optional arguments.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_misarg\r
+//==== LABEL Check if readValue method called with missing non-optional argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.readValue();\r
+ }, "Invoked with missing non-optional arguments.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch
-//==== LABEL Check if readValue throws exception when successCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, conversionTable, exceptionName, i, flag = false, j;
-
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- ReadValueSuccessCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.readValue(ReadValueSuccessCallback);
- }, "Given incorrect success callback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_TypeMismatch\r
+//==== LABEL Check if readValue throws exception when successCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, conversionTable, exceptionName, i, flag = false, j;\r
+\r
+t.step(function () {\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ ReadValueSuccessCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.readValue(ReadValueSuccessCallback);\r
+ }, "Given incorrect success callback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_invalid_cb
-//==== LABEL Check if readValue throws exception when successrCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, incorrectCallback, device = null, flag = false, i;
-
-t.step(function () {
- incorrectCallback = {
- onread: t.step_func(function (value) {
- assert_unreached("Invalid successcallback invoked");
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.readValue(incorrectCallback);
- }, "Given incorrect successCallback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_successCallback_invalid_cb\r
+//==== LABEL Check if readValue throws exception when successrCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, incorrectCallback, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ incorrectCallback = {\r
+ onread: t.step_func(function (value) {\r
+ assert_unreached("Invalid successcallback invoked");\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.readValue(incorrectCallback);\r
+ }, "Given incorrect successCallback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_readValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_readValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTDescriptor readValue method with all optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,
- device = null, flag = false, i, descFlag;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_equals(retVal, undefined, "readValue should return undefined");
- device.disconnect();
- t.done();
- });
-
- ReadValueErrorCallback = t.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- descFlag = false;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descFlag == false && descriptor != undefined) {
- retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- descFlag = true;
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_readValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_readValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTDescriptor readValue method with all optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:readValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,\r
+ device = null, flag = false, i, descFlag;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_equals(retVal, undefined, "readValue should return undefined");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ ReadValueErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ descFlag = false;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descFlag == false && descriptor != undefined) {\r
+ retVal = descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ descFlag = true;\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2020 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:
- Feng Zhao <feng.zhao@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTDescriptor_uuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_uuid_attribute
-//==== LABEL Check if BluetoothGATTDescriptor uuid_attribute exists, has type string and is readonly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:uuid A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_readonly(descriptor, "uuid", descriptor.uuid, "string", descriptor.uuid+"Tizen");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_uuid_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_uuid_attribute\r
+//==== LABEL Check if BluetoothGATTDescriptor uuid_attribute exists, has type string and is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:uuid A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, { timeout: 60000 }), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT && LE_GATT_SUPPORT) { // check bluetooth and le and gatt support\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_readonly(descriptor, "uuid", descriptor.uuid, "string", descriptor.uuid + "Tizen");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue
-//==== LABEL heck if BluetoothGATTDescriptor readValue method without optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MR MMINA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, retVal = null, data = new Array(1, 2, 3, 4, 5, 6),
- flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- retVal = descriptor.writeValue(data);
- assert_equals(retVal, undefined, "writeValue should return undefined");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue\r
+//==== LABEL heck if BluetoothGATTDescriptor readValue method without optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MR MMINA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, retVal = null, data = new Array(1, 2, 3, 4, 5, 6),\r
+ flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ retVal = descriptor.writeValue(data);\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_InvalidStateError
-//==== LABEL Check if BluetoothGATTDescriptor writeValue method throw exception when device is not connected
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
- characteristic, descriptor, WriteValueSuccessCallback, device, data = new Array(1, 2, 3, 4, 5, 6);
-
-t.step(function () {
- WriteValueSuccessCallback = t.step_func(function () {
- assert_unreached("writeValue() success callback should not be invoked");
- });
-
- BbLEScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
-
- ondevicefound: t.step_func(function (foundDevice) {
- device = foundDevice;
- if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
- adapter.stopScan();
- service = device.getService(device.uuids[0]);
- if (service.characteristics.length > 0) {
- characteristic = service.characteristics[0];
- descriptor = characteristic.descriptors[0];
- assert_throws(INVALID_STATE_ERR, function () {
- descriptor.writeValue(data, WriteValueSuccessCallback);
- }, "Should throw exception when device is not connected");
- t.done();
- }
- }
- }),
-
- onfinished: t.step_func(function (devices) {
- })
- };
-
- BbLEScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_InvalidStateError\r
+//==== LABEL Check if BluetoothGATTDescriptor writeValue method throw exception when device is not connected\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+ characteristic, descriptor, WriteValueSuccessCallback, device, data = new Array(1, 2, 3, 4, 5, 6);\r
+\r
+t.step(function () {\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_unreached("writeValue() success callback should not be invoked");\r
+ });\r
+\r
+ BbLEScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+\r
+ ondevicefound: t.step_func(function (foundDevice) {\r
+ device = foundDevice;\r
+ if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ adapter.stopScan();\r
+ service = device.getService(device.uuids[0]);\r
+ if (service.characteristics.length > 0) {\r
+ characteristic = service.characteristics[0];\r
+ descriptor = characteristic.descriptors[0];\r
+ assert_throws(INVALID_STATE_ERR, function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback);\r
+ }, "Should throw exception when device is not connected");\r
+ t.done();\r
+ }\r
+ }\r
+ }),\r
+\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ BbLEScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch
-//==== LABEL Check if writeValue throws exception when errorCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, data = new Array(1, 2, 3, 4, 5, 6),
- service, device = null, onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback,
- WriteValueErrorCallback, conversionTable, exceptionName, i, flag = false, j;
-
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- WriteValueSuccessCallback = t.step_func(function (value) {
- assert_unreached("writeValue() success callback should not be invoked.");
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- WriteValueErrorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
- }, "Given incorrect error callback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_TypeMismatch\r
+//==== LABEL Check if writeValue throws exception when errorCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, data = new Array(1, 2, 3, 4, 5, 6),\r
+ service, device = null, onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback,\r
+ WriteValueErrorCallback, conversionTable, exceptionName, i, flag = false, j;\r
+\r
+t.step(function () {\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ WriteValueSuccessCallback = t.step_func(function (value) {\r
+ assert_unreached("writeValue() success callback should not be invoked.");\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ WriteValueErrorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+ }, "Given incorrect error callback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb
-//==== LABEL Check if writeValue throws exception when errorCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, flag = false,
- onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, incorrectCallback, device = null,
- data = new Array(1, 2, 3, 4, 5, 6), i;
-
-t.step(function () {
- WriteValueSuccessCallback = t.step_func(function () {
- assert_unreached("writeValue() success callback should not be invoked.");
- });
-
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);
- }, "Given incorrect errorCallback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_errorCallback_invalid_cb\r
+//==== LABEL Check if writeValue throws exception when errorCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, flag = false,\r
+ onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, incorrectCallback, device = null,\r
+ data = new Array(1, 2, 3, 4, 5, 6), i;\r
+\r
+t.step(function () {\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_unreached("writeValue() success callback should not be invoked.");\r
+ });\r
+\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_exist
-//==== LABEL Check if writeValue exists
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA ME
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- check_method_exists(descriptor, "writeValue");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_exist\r
+//==== LABEL Check if writeValue exists\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ check_method_exists(descriptor, "writeValue");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_misarg
-//==== LABEL Check if writeValue method called with missing non-optional argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.writeValue();
- }, "Invoked with missing non-optional arguments.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_misarg\r
+//==== LABEL Check if writeValue method called with missing non-optional argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, flag = false, i;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.writeValue();\r
+ }, "Invoked with missing non-optional arguments.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch
-//==== LABEL Check if writeValue throws exception when successCallback is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null, flag = false,
- onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, conversionTable, exceptionName, i, data = new Array(1, 2, 3, 4, 5, 6), j;
-
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- WriteValueSuccessCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.writeValue(data, WriteValueSuccessCallback);
- }, "Given incorrect success callback.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_TypeMismatch\r
+//==== LABEL Check if writeValue throws exception when successCallback is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service, device = null, flag = false,\r
+ onconnected, onerror, characteristic, descriptor, WriteValueSuccessCallback, conversionTable, exceptionName, i, data = new Array(1, 2, 3, 4, 5, 6), j;\r
+\r
+t.step(function () {\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ WriteValueSuccessCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.writeValue(data, WriteValueSuccessCallback);\r
+ }, "Given incorrect success callback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb
-//==== LABEL Check if writeValue throws exception when successrCallback is invalid
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, device = null, incorrectCallback, data = new Array(1, 2, 3, 4, 5, 6),
- flag = false, i;
-
-t.step(function () {
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Invalid successcallback invoked");
- })
- };
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- assert_throws(TYPE_MISMATCH_EXCEPTION, function () {
- descriptor.writeValue(data, incorrectCallback);
- }, "Given incorrect successCallback.");
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_successCallback_invalid_cb\r
+//==== LABEL Check if writeValue throws exception when successrCallback is invalid\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, device = null, incorrectCallback, data = new Array(1, 2, 3, 4, 5, 6),\r
+ flag = false, i;\r
+\r
+t.step(function () {\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Invalid successcallback invoked");\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION, function () {\r
+ descriptor.writeValue(data, incorrectCallback);\r
+ }, "Given incorrect successCallback.");\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_value_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_value_TypeMismatch
-//==== LABEL Check if readValue throws exception when value is incorrect
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P2
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MC
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- device = null, onconnected, onerror, characteristic, descriptor, conversionTable, exceptionName, i, data, flag = false, j;
-
-t.step(function () {
- conversionTable = getTypeConversionExceptions("array", true);
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- for (j = 0; j < service.characteristics.length; j++) {
- characteristic = service.characteristics[j];
- if (characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- for (i = 0; i < conversionTable.length; i++) {
- data = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- descriptor.writeValue(data);
- }, "Given incorrect value.");
- }
- device.disconnect();
- t.done();
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_value_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_value_TypeMismatch\r
+//==== LABEL Check if readValue throws exception when value is incorrect\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P2\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ device = null, onconnected, onerror, characteristic, descriptor, conversionTable, exceptionName, i, data, flag = false, j;\r
+\r
+t.step(function () {\r
+ conversionTable = getTypeConversionExceptions("array", true);\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ for (j = 0; j < service.characteristics.length; j++) {\r
+ characteristic = service.characteristics[j];\r
+ if (characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ data = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ descriptor.writeValue(data);\r
+ }, "Given incorrect value.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothGATTDescriptor_writeValue_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTDescriptor_writeValue_with_errorCallback
-//==== LABEL Check if BluetoothGATTDescriptor writeValue method with all optional arguments works properly
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M
-//==== SPEC_URL TBD
-//==== PRIORITY P0
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA MOA MR MAST
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,
- WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false, i,
- descFalg;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_equals(value, data, "data should be the same");
- device.disconnect();
- t.done();
- });
-
- ReadValueErrorCallback = t.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- WriteValueSuccessCallback = t.step_func(function () {
- assert_equals(retVal, undefined, "writeValue should return undefined");
- descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- });
-
- WriteValueErrorCallback = t.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- descFalg = false;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (descFalg == false && characteristic != undefined) {
- descriptor = characteristic.descriptors[0];
- if (descriptor != undefined) {
- retVal = descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);
- descFalg = true;
- }
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- BbLEScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- BbLEScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTDescriptor_writeValue_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTDescriptor_writeValue_with_errorCallback\r
+//==== LABEL Check if BluetoothGATTDescriptor writeValue method with all optional arguments works properly\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothGATTDescriptor:writeValue M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P0\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA MOA MR MAST\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,\r
+ WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false, i,\r
+ descFalg;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_equals(value, data, "data should be the same");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ ReadValueErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ WriteValueSuccessCallback = t.step_func(function () {\r
+ assert_equals(retVal, undefined, "writeValue should return undefined");\r
+ descriptor.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ });\r
+\r
+ WriteValueErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ descFalg = false;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (descFalg == false && characteristic != undefined) {\r
+ descriptor = characteristic.descriptors[0];\r
+ if (descriptor != undefined) {\r
+ retVal = descriptor.writeValue(data, WriteValueSuccessCallback, WriteValueErrorCallback);\r
+ descFalg = true;\r
+ }\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ BbLEScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ BbLEScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTService_characteristics_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTService_characteristics_attribute
-//==== LABEL Check characteristics attribute in BluetoothGATTService is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- device = null, flag = false, tmp = [123];
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");
- assert_type(service.characteristics, "array", "characteristics should be an array");
- service.characteristics = tmp;
- assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTService_characteristics_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTService_characteristics_attribute\r
+//==== LABEL Check characteristics attribute in BluetoothGATTService is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:characteristics A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+ device = null, flag = false, tmp = [123];\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ assert_own_property(service, "characteristics", "BluetoothGATTService does not own characteristics property.");\r
+ assert_type(service.characteristics, "array", "characteristics should be an array");\r
+ service.characteristics = tmp;\r
+ assert_not_equals(service.characteristics, tmp, "characteristics should not be modified");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Feng Zhao <feng.zhao@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTService_serviceUuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTService_serviceUuid_attribute
-//==== LABEL Check uuid attribute in BluetoothGATTService is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:serviceUuid A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid+"Tizen");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+<html>\r
+\r
+<head>\r
+ <title>BluetoothGATTService_serviceUuid_attribute</title>\r
+ <meta charset="utf-8" />\r
+ <script src="support/unitcommon.js"></script>\r
+ <script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+ <div id="log"></div>\r
+ <script>\r
+ //==== TEST: BluetoothGATTService_serviceUuid_attribute\r
+ //==== LABEL Check uuid attribute in BluetoothGATTService is readonly\r
+ //==== EXECUTION_TYPE manual\r
+ //==== PRE The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+ //==== PRIORITY P1\r
+ //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:serviceUuid A\r
+ //==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+ //==== TEST_CRITERIA AE AT ARO\r
+\r
+ setup({ timeout: 180000 });\r
+\r
+ var adapter = null, t = async_test(document.title, { timeout: 180000 }), SuccessCB, onconnected, service,\r
+ device = null, flag = false;\r
+\r
+ t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT && LE_GATT_SUPPORT) { // check bluetooth and le and gatt support\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ check_readonly(service, "serviceUuid", service.serviceUuid, "string", service.serviceUuid + "Tizen");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+ } else {\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ </script>\r
+</body>\r
+\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothGATTService_services_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothGATTService_services_attribute
-//==== LABEL Check services attribute in BluetoothGATTService is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- retValue = null, device = null, flag = false, tmp = [123];
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- assert_own_property(service, "services", "BluetoothGATTService does not own services property.");
- assert_type(service.services, "array", "services should be an array");
- service.services = tmp;
- assert_not_equals(service.services, tmp, "services should not be modified");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothGATTService_services_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothGATTService_services_attribute\r
+//==== LABEL Check services attribute in BluetoothGATTService is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothGATTService:services A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+ retValue = null, device = null, flag = false, tmp = [123];\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ assert_own_property(service, "services", "BluetoothGATTService does not own services property.");\r
+ assert_type(service.services, "array", "services should be an array");\r
+ service.services = tmp;\r
+ assert_not_equals(service.services, tmp, "services should not be modified");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_extend
-//==== LABEL Test whether the object can have new properties added for BluetoothLEAdapter
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:BluetoothLEAdapter U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA OBX
-
-test(function () {
- var adapter = tizen.bluetooth.getLEAdapter();
- check_extensibility(adapter);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_extend\r
+//==== LABEL Test whether the object can have new properties added for BluetoothLEAdapter\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:BluetoothLEAdapter U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA OBX\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var adapter = tizen.bluetooth.getLEAdapter();\r
+ check_extensibility(adapter);\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_notexist
-//==== LABEL Check if is possible to call BluetoothLEAdapter in new expresion
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA NIO
-
-test(function () {
- check_no_interface_object("BluetoothLEAdapter");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_notexist\r
+//==== LABEL Check if is possible to call BluetoothLEAdapter in new expresion\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_no_interface_object("BluetoothLEAdapter");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise
-//==== LABEL Check with startAdvertise arguments work properity(without optional argument)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,
- retValue = null, advertiseData;
-
-t.step(function () {
- successCallback = t.step_func(function (state) {
- assert_equals(retValue, undefined, "startAdvertise returns wrong value");
- adapter.stopAdvertise();
- t.done();
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise\r
+//==== LABEL Check with startAdvertise arguments work properity(without optional argument)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,\r
+ retValue = null, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function (state) {\r
+ assert_equals(retValue, undefined, "startAdvertise returns wrong value");\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_InvalidStateError
-//==== LABEL Check whether startAdvertise() method throws an exception when device is currently in progress of advertising
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCallback,
- successCallback, advertiseData;
-
-t.step(function () {
- successCallback = t.step_func(function () {
- assert_unreached("Invalid Success callback invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("Invalid Error callback invoked");
- });
-
- SuccessCB = t.step_func(function () {
- assert_throws({name: "InvalidStateError"}, function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "InvalidStateError should be thrown with device is currently in progress of advertising");
- adapter.stopAdvertise();
- t.done();
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_InvalidStateError\r
+//==== LABEL Check whether startAdvertise() method throws an exception when device is currently in progress of advertising\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCallback,\r
+ successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Invalid Success callback invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("Invalid Error callback invoked");\r
+ });\r
+\r
+ SuccessCB = t.step_func(function () {\r
+ assert_throws({ name: "InvalidStateError" }, function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "InvalidStateError should be thrown with device is currently in progress of advertising");\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", SuccessCB);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_QuotaExceededError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaExceededError
-//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), errorCallback,
- successCallback, advertiseData, advertiseDataInit;
-
-t.step(function () {
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- serviceuuids: ["180f","181f","182f","183f","184f","185f","186f","187f","188f","189f","190f","180f","181f","182f","183f","184f","185f","186f","187f","188f","189f","190f"],
- solicitationuuids: ["180d","181d","182d","183d","184d","185d","186d","187d","188d","189d","190d","180d","181d","182d","183d","184d","185d","186d","187d","188d",
- "189d","190d","180d","181d","182d","183d","184d","185d","186d","187d","188d","189d","190d","180d","181d","182d","183d","184d","185d","186d","187d","188d","189d",
- "190d","180d","181d","182d","183d","184d","185d","186d","187d","188d","189d","190d"]
- };
-
- successCallback = t.step_func(function (state) {
- assert_unreached("SuccessCallback should not be invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("startAdvertise errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_throws({name: "QuotaExceededError"}, function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "QuotaExceededError should be thrown with input attribute is not compatible with the maximum data size for this attribute");
- adapter.stopAdvertise();
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_QuotaExceededError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaExceededError\r
+//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), errorCallback,\r
+ successCallback, advertiseData, advertiseDataInit;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ serviceuuids: ["180f", "181f", "182f", "183f", "184f", "185f", "186f", "187f", "188f", "189f", "190f", "180f", "181f", "182f", "183f", "184f", "185f", "186f", "187f", "188f", "189f", "190f"],\r
+ solicitationuuids: ["180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d", "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d",\r
+ "189d", "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d", "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d",\r
+ "190d", "180d", "181d", "182d", "183d", "184d", "185d", "186d", "187d", "188d", "189d", "190d"]\r
+ };\r
+\r
+ successCallback = t.step_func(function (state) {\r
+ assert_unreached("SuccessCallback should not be invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("startAdvertise errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_throws({ name: "QuotaExceededError" }, function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "QuotaExceededError should be thrown with input attribute is not compatible with the maximum data size for this attribute");\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_QuotaPatameterError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaPatameterError
-//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCB, errorCallback,
- successCallback, advertiseData, advertiseDataInit;
-
-t.step(function () {
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: -10,
- serviceuuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback should not be invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("ErrorCallback should not be invoked");
- });
-
- SuccessCB = {
- onstarted: t.step_func(function () {
- assert_throws({name: "QuotaPatameterError"}, function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "QuotaPatameterError should be thrown with input attribute is not compatible with the maximum data size for this attribute");
- t.done();
- }),
- ondevicefound: t.step_func(function (device) {
- if(devices.length > 0){
- adapter.stopScan();
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- errorCB = t.step_func(function (e) {
- assert_unreached("startScanErrorCB exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_QuotaPatameterError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_QuotaPatameterError\r
+//==== LABEL Check whether startAdvertise() method throws an exception when input attribute is not compatible with the maximum data size for this attribute\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, errorCB, errorCallback,\r
+ successCallback, advertiseData, advertiseDataInit;\r
+\r
+t.step(function () {\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: -10,\r
+ serviceuuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback should not be invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("ErrorCallback should not be invoked");\r
+ });\r
+\r
+ SuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ assert_throws({name: "QuotaPatameterError"}, function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "QuotaPatameterError should be thrown with input attribute is not compatible with the maximum data size for this attribute");\r
+ t.done();\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ if(devices.length > 0){\r
+ adapter.stopScan();\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ errorCB = t.step_func(function (e) {\r
+ assert_unreached("startScanErrorCB exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ adapter.startScan(successCB, errorCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid advertiseData argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, successCallback, advertiseData;
-
-t.step(function () {
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback should not be invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- conversionTable = getTypeConversionExceptions("object", false);
- for(i = 0; i < conversionTable.length; i++) {
- advertiseData = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", true);
- }, "Given incorrect errorCallback.");
- }
- adapter.stopAdvertise();
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_advertiseData_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid advertiseData argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback should not be invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ conversionTable = getTypeConversionExceptions("object", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ advertiseData = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", true);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid connectable argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, connectable,
- conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;
-
-t.step(function () {
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- serviceuuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback should not be invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- conversionTable = getTypeConversionExceptions("boolean", true);
- for(i = 0; i < conversionTable.length; i++) {
- connectable = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", connectable);
- }, "Given incorrect errorCallback.");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_connectable_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid connectable argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, connectable,\r
+ conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;\r
+\r
+t.step(function () {\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ serviceuuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback should not be invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ conversionTable = getTypeConversionExceptions("boolean", true);\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ connectable = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, "BALANCED", connectable);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, successCallback, advertiseData;
-
-t.step(function () {
-
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback is invoked");
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- adapter.stopAdvertise();
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback is invoked");\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb
-//==== LABEL Check startAdvertise() argument errorCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- successCallback, errorCallback, advertiseData;
-
-t.step(function () {
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback is invoked");
- });
-
- errorCallback = {
- onerror: t.step_func(function () {
- assert_unreached("Invalid callback invoked");
- })
- };
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- adapter.stopAdvertise();
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_errorCallback_invalid_cb\r
+//==== LABEL Check startAdvertise() argument errorCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ successCallback, errorCallback, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback is invoked");\r
+ });\r
+\r
+ errorCallback = {\r
+ onerror: t.step_func(function () {\r
+ assert_unreached("Invalid callback invoked");\r
+ })\r
+ };\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_exist
-//==== LABEL Check if startAdvertise method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
- var adapter = tizen.bluetooth.getLEAdapter();
- check_method_exists(adapter, "startAdvertise");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_exist\r
+//==== LABEL Check if startAdvertise method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var adapter = tizen.bluetooth.getLEAdapter();\r
+ check_method_exists(adapter, "startAdvertise");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_misarg
-//==== LABEL Check startAdvertise with missing all argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-var adapter;
-
-test(function () {
- adapter = tizen.bluetooth.getLEAdapter();
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- adapter.startAdvertise();
- }, "Method with non optional argument.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_misarg\r
+//==== LABEL Check startAdvertise with missing all argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ adapter.startAdvertise();\r
+ }, "Method with non optional argument.");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_mode_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_mode_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid mode argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, mode,
- conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;
-
-t.step(function () {
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- serviceuuids: ["180f"],
- solicitationuuids: ["180d"]
- };
-
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback should not be invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- conversionTable = getTypeConversionExceptions("enum", true, true);
- for(i = 0; i < conversionTable.length; i++) {
- mode = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, mode, true);
- }, "Given incorrect mode.");
- }
- adapter.stopAdvertise();
- t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_mode_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_mode_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid mode argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, mode,\r
+ conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ serviceuuids: ["180f"],\r
+ solicitationuuids: ["180d"]\r
+ };\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback should not be invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ conversionTable = getTypeConversionExceptions("enum", true, true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ mode = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "ADVERTISE", successCallback, errorCallback, mode, true);\r
+ }, "Given incorrect mode.");\r
+ }\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid packetType argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, packetType,
- conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;
-
-t.step(function () {
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- serviceuuids: ["180f"],
- solicitationuuids: ["180d"]
- };
-
- successCallback = t.step_func(function () {
- assert_unreached("SuccessCallback should not be invoked");
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- conversionTable = getTypeConversionExceptions("enum", false);
- for(i = 0; i < conversionTable.length; i++) {
- packetType = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startAdvertise(advertiseData, packetType, successCallback, errorCallback, "BALANCED", true);
- }, "Given incorrect packetType.");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_packetType_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid packetType argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i, packetType,\r
+ conversionTable, errorCallback, successCallback, advertiseDataInit, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ serviceuuids: ["180f"],\r
+ solicitationuuids: ["180d"]\r
+ };\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("SuccessCallback should not be invoked");\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ conversionTable = getTypeConversionExceptions("enum", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ packetType = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, packetType, successCallback, errorCallback, "BALANCED", true);\r
+ }, "Given incorrect packetType.");\r
+ }\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch
-//==== LABEL Check whether startAdvertise() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, successCallback, advertiseData;
-
-t.step(function () {
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("successCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_TypeMismatch\r
+//==== LABEL Check whether startAdvertise() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, successCallback, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("successCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb
-//==== LABEL Check startAdvertise() argument successCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- successCallback, errorCallback, advertiseData;
-
-t.step(function () {
- successCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method startAdvertise shouldn't end successfully.");
- })
- };
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCB exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_successCallback_invalid_cb\r
+//==== LABEL Check startAdvertise() argument successCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ successCallback, errorCallback, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method startAdvertise shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCB exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startAdvertise_with_connectable</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startAdvertise_with_connectable
-//==== LABEL Check with startAdvertise arguments work properity(with all optional arguments)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback,
- retValue = null, advertiseData;
-
-t.step(function () {
- successCallback = t.step_func(function (state) {
- assert_equals(retValue, undefined, "startAdvertise returns wrong value");
- adapter.stopAdvertise();
- t.done();
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("startAdvertise errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback, "LOW_ENERGY", false);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startAdvertise_with_connectable</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startAdvertise_with_connectable\r
+//==== LABEL Check with startAdvertise arguments work properity(with all optional arguments)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback, errorCallback,\r
+ retValue = null, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function (state) {\r
+ assert_equals(retValue, undefined, "startAdvertise returns wrong value");\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("startAdvertise errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback, "LOW_ENERGY", false);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan
-//==== LABEL Check with non-optional arguments startScan(valid_successCallback)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
- retValue = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (device) {
- assert_equals(retValue, undefined, "startScan returns wrong value");
- adapter.stopScan();
- t.done();
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan\r
+//==== LABEL Check with non-optional arguments startScan(valid_successCallback)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+ retValue = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (device) {\r
+ assert_equals(retValue, undefined, "startScan returns wrong value");\r
+ adapter.stopScan();\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_InvalidStateError
-//==== LABEL Check startScan() method could throw InvalidStateError exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB, successCB1, errorCB1;
-
-t.step(function () {
- successCB1 = t.step_func(function () {
- assert_unreached("Invalid Success callback invoked");
- });
-
- errorCB1 = t.step_func(function (e) {
- assert_unreached("Invalid Error callback invoked");
- });
-
- successCB = t.step_func(function () {
- assert_throws({name: 'InvalidStateError'}, function () {
- adapter.startScan(successCB1, errorCB1);
- }, "InvalidStateError should be thrown when bluetooth is turned off");
- t.done();
- });
-
- errorCB = t.step_func(function (e) {
- assert_unreached("Invalid Error callback invoked");
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_InvalidStateError\r
+//==== LABEL Check startScan() method could throw InvalidStateError exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB, successCB1, errorCB1;\r
+\r
+t.step(function () {\r
+ successCB1 = t.step_func(function () {\r
+ assert_unreached("Invalid Success callback invoked");\r
+ });\r
+\r
+ errorCB1 = t.step_func(function (e) {\r
+ assert_unreached("Invalid Error callback invoked");\r
+ });\r
+\r
+ successCB = t.step_func(function () {\r
+ assert_throws({name: 'InvalidStateError'}, function () {\r
+ adapter.startScan(successCB1, errorCB1);\r
+ }, "InvalidStateError should be thrown when bluetooth is turned off");\r
+ t.done();\r
+ });\r
+\r
+ errorCB = t.step_func(function (e) {\r
+ assert_unreached("Invalid Error callback invoked");\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(successCB, errorCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_errorCallback_TypeMismatch
-//==== LABEL Check whether startScan() method called with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, successCallback;
-
-t.step(function () {
- successCallback = t.step_func(function () {
- assert_unreached("Success callback invoked");
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- conversionTable = getTypeConversionExceptions("functionObject", true);
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- adapter.startScan(successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_errorCallback_TypeMismatch\r
+//==== LABEL Check whether startScan() method called with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, successCallback;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Success callback invoked");\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.startScan(successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_errorCallback_invalid_cb
-//==== LABEL Check startScan() argument errorCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- successCB, errorCB;
-
-t.step(function () {
- successCB = t.step_func(function () {
- assert_unreached("Success callback invoked");
- });
-
- errorCB = {
- onerror: t.step_func(function () {
- assert_unreached("Invalid callback invoked");
- })
- };
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- adapter.startScan(successCB, errorCB);
- }, "Given incorrect successCallback.");
- t.done();
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_errorCallback_invalid_cb\r
+//==== LABEL Check startScan() argument errorCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ successCB, errorCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCB = t.step_func(function () {\r
+ assert_unreached("Success callback invoked");\r
+ });\r
+\r
+ errorCB = {\r
+ onerror: t.step_func(function () {\r
+ assert_unreached("Invalid callback invoked");\r
+ })\r
+ };\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ adapter.startScan(successCB, errorCB);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_exist
-//==== LABEL Method of startScan exists in BluetoothLEAdapter
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
- var adapter = tizen.bluetooth.getLEAdapter();
- check_method_exists(adapter, "startScan");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_exist\r
+//==== LABEL Method of startScan exists in BluetoothLEAdapter\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var adapter = tizen.bluetooth.getLEAdapter();\r
+ check_method_exists(adapter, "startScan");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_misarg
-//==== LABEL Check startScan with missing all argument
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-test(function () {
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- assert_throws ({name:"TypeMismatchError"},
- function () {
- adapter.startScan();
- }, "Method with missing non-optional argument.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_misarg\r
+//==== LABEL Check startScan with missing all argument\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ assert_throws({ name: "TypeMismatchError" },\r
+ function () {\r
+ adapter.startScan();\r
+ }, "Method with missing non-optional argument.");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_successCallback_TypeMismatch
-//==== LABEL Check whether startScan() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, errorCallback, successCallback;
-
-t.step(function () {
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- conversionTable = getTypeConversionExceptions("functionObject", false);
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- adapter.startScan(successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
- t.done();
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_successCallback_TypeMismatch\r
+//==== LABEL Check whether startScan() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, errorCallback, successCallback;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ adapter.startScan(successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_successCallback_invalid_cb
-//==== LABEL Check startScan() argument successCallback validation - use simple function
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter, t = async_test(document.title, {timeout: 180000}),
- InvalidSuccessCB, errorCB;
-
-t.step(function () {
- InvalidSuccessCB = {
- onsuccess: t.step_func(function (device) {
- assert_unreached("Invalid successCallback invoked.");
- })
- };
-
- errorCB = t.step_func(function (e) {
- assert_unreached("errorCB exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- adapter.startScan(InvalidSuccessCB, errorCB);
- }, "Given incorrect successCallback.");
- t.done();
-
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_successCallback_invalid_cb\r
+//==== LABEL Check startScan() argument successCallback validation - use simple function\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter, t = async_test(document.title, {timeout: 180000}),\r
+ InvalidSuccessCB, errorCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ InvalidSuccessCB = {\r
+ onsuccess: t.step_func(function (device) {\r
+ assert_unreached("Invalid successCallback invoked.");\r
+ })\r
+ };\r
+\r
+ errorCB = t.step_func(function (e) {\r
+ assert_unreached("errorCB exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ adapter.startScan(InvalidSuccessCB, errorCB);\r
+ }, "Given incorrect successCallback.");\r
+ t.done();\r
+\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_startScan_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_startScan_with_errorCallback
-//==== LABEL Check with optional arguments startScan(valid_successCallback, errorCallback)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MAST
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB;
-
-t.step(function () {
- successCB = t.step_func(function (device) {
- adapter.stopScan();
- t.done();
- });
-
- errorCB = t.step_func(function (e) {
- assert_unreached("startScan ErrorCB exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_startScan_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_startScan_with_errorCallback\r
+//==== LABEL Check with optional arguments startScan(valid_successCallback, errorCallback)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MAST\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCB = t.step_func(function (device) {\r
+ adapter.stopScan();\r
+ t.done();\r
+ });\r
+\r
+ errorCB = t.step_func(function (e) {\r
+ assert_unreached("startScan ErrorCB exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(successCB, errorCB);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopAdvertise</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopAdvertise
-//==== LABEL Check with stopAdvertise method of BluetoothLEAdapter work properly
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,
- retValue = null, advertiseData;
-
-t.step(function () {
- successCallback = t.step_func(function (state) {
- retValue = adapter.stopAdvertise();
- assert_equals(retValue, undefined, "stopScan returns wrong value");
- t.done();
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- adapter.stopAdvertise();
- adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopAdvertise</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopAdvertise\r
+//==== LABEL Check with stopAdvertise method of BluetoothLEAdapter work properly\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCallback,\r
+ retValue = null, advertiseData;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function (state) {\r
+ retValue = adapter.stopAdvertise();\r
+ assert_equals(retValue, undefined, "stopScan returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ adapter.stopAdvertise();\r
+ adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopAdvertise_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopAdvertise_exist
-//==== LABEL Check if stopAdvertise method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
- var adapter = tizen.bluetooth.getLEAdapter();
- check_method_exists(adapter, "stopAdvertise");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopAdvertise_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopAdvertise_exist\r
+//==== LABEL Check if stopAdvertise method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var adapter = tizen.bluetooth.getLEAdapter();\r
+ check_method_exists(adapter, "stopAdvertise");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopAdvertise_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopAdvertise_extra_argument
-//==== LABEL Check if method stopAdvertise of BluetoothLEAdapter accepts extra argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-var adapter;
-
-test(function () {
- adapter = tizen.bluetooth.getLEAdapter();
- checkExtraArgument(adapter, "stopAdvertise");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopAdvertise_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopAdvertise_extra_argument\r
+//==== LABEL Check if method stopAdvertise of BluetoothLEAdapter accepts extra argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopAdvertise M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ checkExtraArgument(adapter, "stopAdvertise");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopScan</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopScan
-//==== LABEL check stopScan method is working well in BluetoothLEAdapter
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MNAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB,
- retValue = null;
-
-t.step(function () {
- successCB = t.step_func(function (device) {
- retValue = adapter.stopScan();
- assert_equals(retValue, undefined, "stopScan returns wrong value");
- t.done();
- });
-
- errorCB = t.step_func(function (e) {
- assert_unreached("startScanErrorCB exception:" + e.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(successCB, errorCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopScan</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopScan\r
+//==== LABEL check stopScan method is working well in BluetoothLEAdapter\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), successCB, errorCB,\r
+ retValue = null;\r
+\r
+t.step(function () {\r
+ successCB = t.step_func(function (device) {\r
+ retValue = adapter.stopScan();\r
+ assert_equals(retValue, undefined, "stopScan returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ errorCB = t.step_func(function (e) {\r
+ assert_unreached("startScanErrorCB exception:" + e.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(successCB, errorCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopScan_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopScan_exist
-//==== LABEL Check if stopScan method exist
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-var adapter;
-
-test(function () {
- adapter = tizen.bluetooth.getLEAdapter();
- check_method_exists(adapter, "stopScan");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopScan_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopScan_exist\r
+//==== LABEL Check if stopScan method exist\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ check_method_exists(adapter, "stopScan");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdapter_stopScan_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdapter_stopScan_extra_argument
-//==== LABEL Check if method stopScan of BluetoothLEAdapter accepts extra argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-var adapter;
-
-test(function () {
- adapter = tizen.bluetooth.getLEAdapter();
- checkExtraArgument(adapter, "stopScan");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdapter_stopScan_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdapter_stopScan_extra_argument\r
+//==== LABEL Check if method stopScan of BluetoothLEAdapter accepts extra argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+var adapter;\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ checkExtraArgument(adapter, "stopScan");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseCallback_notexist
-//==== LABEL Check if interface BluetoothLEAdvertiseCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:BluetoothLEAdvertiseCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
- check_no_interface_object("BluetoothLEAdvertiseCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseCallback_notexist\r
+//==== LABEL Check if interface BluetoothLEAdvertiseCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:BluetoothLEAdvertiseCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_no_interface_object("BluetoothLEAdvertiseCallback");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseCallback_onstate</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseCallback_onstate
-//==== LABEL Check if BluetoothLEAdvertiseCallback onstate is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:onstate M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var adapter = null, t = async_test(document.title, {timeout: 60000}), successCallback, errorCallback, advertiseData, advertiseOptions;
-
-t.step(function () {
- successCallback = t.step_func(function (state) {
- assert_type(state, "string", "state type is wrong");
- assert_equals(state, "STARTED", "state type check");
- adapter.stopAdvertise();
- t.done();
- });
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("startAdvertise errorCallback exception:" + e.message);
- });
-
-
- adapter = tizen.bluetooth.getLEAdapter();
- advertiseData = new tizen.BluetoothLEAdvertiseData();
- retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseCallback_onstate</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseCallback_onstate\r
+//==== LABEL Check if BluetoothLEAdvertiseCallback onstate is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseCallback:onstate M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 60000}), successCallback, errorCallback, advertiseData, advertiseOptions;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ successCallback = t.step_func(function (state) {\r
+ assert_type(state, "string", "state type is wrong");\r
+ assert_equals(state, "STARTED", "state type check");\r
+ adapter.stopAdvertise();\r
+ t.done();\r
+ });\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("startAdvertise errorCallback exception:" + e.message);\r
+ });\r
+\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ retValue = adapter.startAdvertise(advertiseData, "SCAN_RESPONSE", successCallback, errorCallback);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_appearance_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_appearance_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have appearance attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:appearance A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
- var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- uuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- check_attribute(advertiseData, "appearance", null, "unsigned long", 192);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_appearance_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_appearance_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have appearance attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:appearance A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ uuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ check_attribute(advertiseData, "appearance", null, "unsigned long", 192);\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_constructor</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_constructor
-//==== LABEL Check BluetoothLEAdvertiseData constructor
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA CONSTRA CONSTRM
-
-test(function () {
- var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- uuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_equals(advertiseData.includeName, advertiseDataInit.includeName, "includeName should not be equal");
- assert_equals(advertiseData.includeTxPowerLevel, advertiseDataInit.includeTxPowerLevel, "includeTxPowerLevel should not be equal");
- assert_equals(advertiseData.appearance, advertiseDataInit.appearance, "appearance should not be equal");
- assert_equals(advertiseData.uuids[0], advertiseDataInit.uuids[0], "uuids should not be equal");
- assert_equals(advertiseData.solicitationuuids[0], advertiseDataInit.solicitationuuids[0], "solicitationuuids should not be equal");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_constructor</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_constructor\r
+//==== LABEL Check BluetoothLEAdvertiseData constructor\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CONSTRA CONSTRM\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ uuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_equals(advertiseData.includeName, advertiseDataInit.includeName, "includeName should not be equal");\r
+ assert_equals(advertiseData.includeTxPowerLevel, advertiseDataInit.includeTxPowerLevel, "includeTxPowerLevel should not be equal");\r
+ assert_equals(advertiseData.appearance, advertiseDataInit.appearance, "appearance should not be equal");\r
+ assert_equals(advertiseData.uuids[0], advertiseDataInit.uuids[0], "uuids should not be equal");\r
+ assert_equals(advertiseData.solicitationuuids[0], advertiseDataInit.solicitationuuids[0], "solicitationuuids should not be equal");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_exist
-//==== LABEL Check if BluetoothLEAdvertiseData exists
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA CONSTRF
-
-test(function () {
- check_constructor("BluetoothLEAdvertiseData");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_exist\r
+//==== LABEL Check if BluetoothLEAdvertiseData exists\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData C\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA CONSTRF\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_constructor("BluetoothLEAdvertiseData");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_extend
-//==== LABEL Check if BluetoothLEAdvertiseData can have new properties added
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA OBX
-
-test(function () {
- var advertiseData = new tizen.BluetoothLEAdvertiseData();
- check_extensibility(advertiseData);
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_extend\r
+//==== LABEL Check if BluetoothLEAdvertiseData can have new properties added\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:BluetoothLEAdvertiseData U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA OBX\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseData = new tizen.BluetoothLEAdvertiseData();\r
+ check_extensibility(advertiseData);\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_includeName_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_includeName_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have includeName attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeName A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
- var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
- advertiseDataInit = {
- includeTxPowerLevel: true,
- appearance: 192,
- uuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_own_property(advertiseData, "includeName", "advertiseData does not own includeName property");
- assert_equals(advertiseData.includeName, false, "includeName should be false by default");
- assert_type(advertiseData.includeName, "boolean", "includeName isn't an boolean");
- advertiseData.includeName = true;
- assert_equals(advertiseData.includeName, true, "includeName should be true");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_includeName_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_includeName_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have includeName attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeName A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+ advertiseDataInit = {\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ uuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_own_property(advertiseData, "includeName", "advertiseData does not own includeName property");\r
+ assert_equals(advertiseData.includeName, false, "includeName should be false by default");\r
+ assert_type(advertiseData.includeName, "boolean", "includeName isn't an boolean");\r
+ advertiseData.includeName = true;\r
+ assert_equals(advertiseData.includeName, true, "includeName should be true");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_includeTxPowerLevel_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_includeTxPowerLevel_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have includeTxPowerLevel attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeTxPowerLevel A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
- var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
- advertiseDataInit = {
- includeName: true,
- appearance: 192,
- uuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_own_property(advertiseData, "includeTxPowerLevel", "advertiseData does not own includeTxPowerLevel property");
- assert_equals(advertiseData.includeTxPowerLevel, false, "includeTxPowerLevel should be false by default");
- assert_type(advertiseData.includeTxPowerLevel, "boolean", "includeTxPowerLevel isn't an boolean");
- advertiseData.includeTxPowerLevel = true;
- assert_equals(advertiseData.includeTxPowerLevel, true, "includeTxPowerLevel should be true");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_includeTxPowerLevel_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_includeTxPowerLevel_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have includeTxPowerLevel attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:includeTxPowerLevel A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ appearance: 192,\r
+ uuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_own_property(advertiseData, "includeTxPowerLevel", "advertiseData does not own includeTxPowerLevel property");\r
+ assert_equals(advertiseData.includeTxPowerLevel, false, "includeTxPowerLevel should be false by default");\r
+ assert_type(advertiseData.includeTxPowerLevel, "boolean", "includeTxPowerLevel isn't an boolean");\r
+ advertiseData.includeTxPowerLevel = true;\r
+ assert_equals(advertiseData.includeTxPowerLevel, true, "includeTxPowerLevel should be true");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_manufacturerData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_manufacturerData_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have manufacturerData attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:manufacturerData A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ASG
-
-test(function () {
- var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f",
- device = null, heart_rate_svc_uuid_16 = "180d", mock_manufactureData;
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- uuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_own_property(advertiseData, "manufacturerData", "advertiseData does not own manufacturerData property");
- assert_equals(advertiseData.manufacturerData, null, "manufacturerData should be null by default");
- mock_manufactureData = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- advertiseData.manufacturerData = mock_manufactureData;
- assert_equals(advertiseData.manufacturerData.id, mock_manufactureData.id, "manufacturerData should be updated");
- assert_equals(advertiseData.manufacturerData.data, mock_manufactureData.data, "manufacturerData should be updated");
-},document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_manufacturerData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_manufacturerData_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have manufacturerData attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:manufacturerData A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+ var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f",\r
+ device = null, heart_rate_svc_uuid_16 = "180d", mock_manufactureData;\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ uuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_own_property(advertiseData, "manufacturerData", "advertiseData does not own manufacturerData property");\r
+ assert_equals(advertiseData.manufacturerData, null, "manufacturerData should be null by default");\r
+ mock_manufactureData = new tizen.BluetoothLEManufacturerData("127", "0x0057");\r
+ advertiseData.manufacturerData = mock_manufactureData;\r
+ assert_equals(advertiseData.manufacturerData.id, mock_manufactureData.id, "manufacturerData should be updated");\r
+ assert_equals(advertiseData.manufacturerData.data, mock_manufactureData.data, "manufacturerData should be updated");\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Feng Zhao <feng.zhao@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEAdvertiseData_servicesData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_servicesData_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:servicesData A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
- var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData,
- device = null, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d", mock_serviceData;
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- uuids: [battery_svc_uuid_16],
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_own_property(advertiseData, "servicesData", "advertiseData does not own servicesData property");
- assert_equals(advertiseData.servicesData, null, "servicesData should be null by default");
-
- var firstService = new tizen.BluetoothLEServiceData("11e5", "0x1811");
- var secondService = new tizen.BluetoothLEServiceData("a5e8", "0x1815");
- advertiseData.servicesData = [firstService, secondService];
-
- assert_equals(advertiseData.servicesData[0].uuid, firstService.uuid, "servicesData should be updated");
- assert_equals(advertiseData.servicesData[1].data, secondService.data, "servicesData should be updated");
-}, document.title);
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Feng Zhao <feng.zhao@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_servicesData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_servicesData_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have servicesData attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:servicesData A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var adapter, BbLEScanSuccessCallback, BbLEScanErrorCallback, advertiseDataInit, advertiseData,\r
+ device = null, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d", mock_serviceData;\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ uuids: [battery_svc_uuid_16],\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_own_property(advertiseData, "servicesData", "advertiseData does not own servicesData property");\r
+ assert_equals(advertiseData.servicesData, null, "servicesData should be null by default");\r
+\r
+ var firstService = new tizen.BluetoothLEServiceData("11e5", "0x1811");\r
+ var secondService = new tizen.BluetoothLEServiceData("a5e8", "0x1815");\r
+ advertiseData.servicesData = [firstService, secondService];\r
+\r
+ assert_equals(advertiseData.servicesData[0].uuid, firstService.uuid, "servicesData should be updated");\r
+ assert_equals(advertiseData.servicesData[1].data, secondService.data, "servicesData should be updated");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_solicitationuuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_solicitationuuids_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have solicitationuuids attribute with proper type and is writeable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:solicitationuuids A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
- var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- uuids: [battery_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_own_property(advertiseData, "solicitationuuids", "advertiseData does not own solicitationuuids property");
- assert_equals(advertiseData.solicitationuuids, null, "solicitationuuids should be null by default");
- advertiseData.solicitationuuids = [heart_rate_svc_uuid_16];
- assert_array_equals(advertiseData.solicitationuuids, ["180d"], "solicitationuuids should be updated");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_solicitationuuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_solicitationuuids_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have solicitationuuids attribute with proper type and is writeable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:solicitationuuids A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ uuids: [battery_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_own_property(advertiseData, "solicitationuuids", "advertiseData does not own solicitationuuids property");\r
+ assert_equals(advertiseData.solicitationuuids, null, "solicitationuuids should be null by default");\r
+ advertiseData.solicitationuuids = [heart_rate_svc_uuid_16];\r
+ assert_array_equals(advertiseData.solicitationuuids, ["180d"], "solicitationuuids should be updated");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEAdvertiseData_uuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAdvertiseData_uuids_attribute
-//==== LABEL Check if BluetoothLEAdvertiseData have uuids attribute with proper type and is writable
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:uuids A
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== TEST_CRITERIA AE AT ADV ASG
-
-test(function () {
- var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";
-
- advertiseDataInit = {
- includeName: true,
- includeTxPowerLevel: true,
- appearance: 192,
- solicitationuuids: [heart_rate_svc_uuid_16]
- };
-
- advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);
- assert_own_property(advertiseData, "uuids", "advertiseData does not own uuids property");
- assert_equals(advertiseData.uuids, null, "Should be null by default");
- advertiseData.uuids = [battery_svc_uuid_16];
- assert_array_equals(advertiseData.uuids, [battery_svc_uuid_16], "uuids can be modified.");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAdvertiseData_uuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAdvertiseData_uuids_attribute\r
+//==== LABEL Check if BluetoothLEAdvertiseData have uuids attribute with proper type and is writable\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEAdvertiseData:uuids A\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== TEST_CRITERIA AE AT ADV ASG\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var advertiseDataInit, advertiseData, battery_svc_uuid_16 = "180f", heart_rate_svc_uuid_16 = "180d";\r
+\r
+ advertiseDataInit = {\r
+ includeName: true,\r
+ includeTxPowerLevel: true,\r
+ appearance: 192,\r
+ solicitationuuids: [heart_rate_svc_uuid_16]\r
+ };\r
+\r
+ advertiseData = new tizen.BluetoothLEAdvertiseData(advertiseDataInit);\r
+ assert_own_property(advertiseData, "uuids", "advertiseData does not own uuids property");\r
+ assert_equals(advertiseData.uuids, null, "Should be null by default");\r
+ advertiseData.uuids = [battery_svc_uuid_16];\r
+ assert_array_equals(advertiseData.uuids, [battery_svc_uuid_16], "uuids can be modified.");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!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:
- Michal Bistyga <m.bistyga@samsung.com>
- Lei Tang <lei312.tang@samsung.com>
- Xiaoyan Qian <xy.qian@samsung.com>
- Qunfang Lin <qunfang.lin@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothLEAttributes</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEAttributes
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A
-//==== TEST_CRITERIA AE AT ASG
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A
-//==== TEST_CRITERIA AE AT ASG
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A
-//==== TEST_CRITERIA AE AT ASG
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A
-//==== TEST_CRITERIA AE AT ASG AN
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U
-//==== TEST_CRITERIA OBX
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), device, proccessDevice, adapter = null, tmp, tmpUuids = [123];
-
-t.step(function () {
- proccessDevice = t.step_func(function (device)
- {
- //BluetoothLEDevice_address_attribute
- test(function () {
- check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");
- }, "BluetoothLEDevice_address_attribute");
-
- //BluetoothLEDevice_appearance_attribute
- test(function () {
- check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);
- }, "BluetoothLEDevice_appearance_attribute");
-
- //BluetoothLEDevice_manufacturerData_attribute
- test(function () {
- if (device.manufacturerData != null)
- {
- tmp = device.manufacturerData;
- device.manufacturerData = new tizen.BluetoothLEManufacturerData("mock_id", "mock_data");
- assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");
- assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");
- }
- }, "BluetoothLEDevice_manufacturerData_attribute");
-
- //BluetoothLEDevice_name_attribute
- test(function () {
- check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");
- }, "BluetoothLEDevice_name_attribute");
-
- //BluetoothLEDevice_rssi_attribute
- test(function () {
- check_readonly(device, "rssi", device.rssi, "long", -1024);
- }, "BluetoothLEDevice_rssi_attribute");
-
- //BluetoothLEDevice_serviceData_attribute
- test(function () {
- check_readonly(device, "serviceData", device.serviceData, "array", 123);
- }, "BluetoothLEDevice_serviceData_attribute");
-
- //BluetoothLEDevice_solicitationuuids_attribute
- test(function () {
- assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");
- if (device.solicitationuuids != null) {
- assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");
- device.solicitationuuids = tmpSoUuids;
- assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");
- }
- }, "BluetoothLEDevice_solicitationuuids_attribute");
-
- //BluetoothLEDevice_txPowerLevel_attribute
- test(function () {
- check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);
- }, "BluetoothLEDevice_txPowerLevel_attribute");
-
- //BluetoothLEDevice_uuids_attribute
- test(function () {
- assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");
- if (device.uuids != null) {
- assert_type(device.uuids, "array", "uuids should be an array");
- device.uuids = tmpUuids;
- assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");
- }
- }, "BluetoothLEDevice_uuids_attribute");
-
- //BluetoothLEManufacturerData_data_attribute
- test(function () {
- if (device.manufacturerData != null) {
- check_attribute(device.manufacturerData, "data", device.manufacturerData.data, "string", device.manufacturerData.data + "new");
- }
- }, "BluetoothLEManufacturerData_data_attribute");
-
- //BluetoothLEManufacturerData_id_attribute
- test(function () {
- if (device.manufacturerData != null) {
- check_attribute(device.manufacturerData, "id", device.manufacturerData.id, "string", device.manufacturerData.id + "new");
- }
- }, "BluetoothLEManufacturerData_id_attribute");
-
- //BluetoothLEServiceData_data_attribute
- test(function () {
- if (device.serviceData != null) {
- check_attribute(device.serviceData, "data", device.serviceData.data, "string", device.serviceData.data + "new");
- }
- }, "BluetoothLEServiceData_data_attribute");
-
- //BluetoothLEServiceData_uuid_attribute
- test(function () {
- if (device.serviceData != null) {
- check_attribute(device.serviceData, "uuid", device.serviceData.uuid, "string", device.serviceData.uuid + "new");
- check_not_nullable(device.serviceData, "uuid");
- }
- }, "BluetoothLEServiceData_uuid_attribute");
-
- //BluetoothLEManufacturerData_extend
- test(function () {
- if (device.manufacturerData != null) {
- check_extensibility(device.manufacturerData);
- };
- }, "BluetoothLEManufacturerData_extend");
-
- //BluetoothLEServiceData_extend
- test(function () {
- if (device.serviceData != null) {
- check_extensibility(device.serviceData);
- };
- }, "BluetoothLEServiceData_extend");
- t.done();
-
- })
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(function onsuccess(bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS)
- {
- adapter.stopScan();
- console.log("Found device: " + bledevice.name);
- device=bledevice;
- proccessDevice(device);
- }
- }, bleScanRrrorCallback);
-});
-
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Michal Bistyga <m.bistyga@samsung.com>\r
+ Lei Tang <lei312.tang@samsung.com>\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEAttributes</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEAttributes\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A\r
+//==== TEST_CRITERIA AE AT ASG\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A\r
+//==== TEST_CRITERIA AE AT ASG\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A\r
+//==== TEST_CRITERIA AE AT ASG\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A\r
+//==== TEST_CRITERIA AE AT ASG AN\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), device, proccessDevice, adapter = null, tmp, tmpUuids = [123];\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ proccessDevice = t.step_func(function (device) {\r
+ //BluetoothLEDevice_address_attribute\r
+ test(function () {\r
+ check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");\r
+ }, "BluetoothLEDevice_address_attribute");\r
+\r
+ //BluetoothLEDevice_appearance_attribute\r
+ test(function () {\r
+ check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);\r
+ }, "BluetoothLEDevice_appearance_attribute");\r
+\r
+ //BluetoothLEDevice_manufacturerData_attribute\r
+ test(function () {\r
+ if (device.manufacturerData != null) {\r
+ tmp = device.manufacturerData;\r
+ device.manufacturerData = new tizen.BluetoothLEManufacturerData("mock_id", "mock_data");\r
+ assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");\r
+ assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");\r
+ }\r
+ }, "BluetoothLEDevice_manufacturerData_attribute");\r
+\r
+ //BluetoothLEDevice_name_attribute\r
+ test(function () {\r
+ check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");\r
+ }, "BluetoothLEDevice_name_attribute");\r
+\r
+ //BluetoothLEDevice_rssi_attribute\r
+ test(function () {\r
+ check_readonly(device, "rssi", device.rssi, "long", -1024);\r
+ }, "BluetoothLEDevice_rssi_attribute");\r
+\r
+ //BluetoothLEDevice_serviceData_attribute\r
+ test(function () {\r
+ check_readonly(device, "serviceData", device.serviceData, "array", 123);\r
+ }, "BluetoothLEDevice_serviceData_attribute");\r
+\r
+ //BluetoothLEDevice_solicitationuuids_attribute\r
+ test(function () {\r
+ assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");\r
+ if (device.solicitationuuids != null) {\r
+ assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");\r
+ device.solicitationuuids = tmpSoUuids;\r
+ assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");\r
+ }\r
+ }, "BluetoothLEDevice_solicitationuuids_attribute");\r
+\r
+ //BluetoothLEDevice_txPowerLevel_attribute\r
+ test(function () {\r
+ check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);\r
+ }, "BluetoothLEDevice_txPowerLevel_attribute");\r
+\r
+ //BluetoothLEDevice_uuids_attribute\r
+ test(function () {\r
+ assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");\r
+ if (device.uuids != null) {\r
+ assert_type(device.uuids, "array", "uuids should be an array");\r
+ device.uuids = tmpUuids;\r
+ assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");\r
+ }\r
+ }, "BluetoothLEDevice_uuids_attribute");\r
+\r
+ //BluetoothLEManufacturerData_data_attribute\r
+ test(function () {\r
+ if (device.manufacturerData != null) {\r
+ check_attribute(device.manufacturerData, "data", device.manufacturerData.data, "string", device.manufacturerData.data + "new");\r
+ }\r
+ }, "BluetoothLEManufacturerData_data_attribute");\r
+\r
+ //BluetoothLEManufacturerData_id_attribute\r
+ test(function () {\r
+ if (device.manufacturerData != null) {\r
+ check_attribute(device.manufacturerData, "id", device.manufacturerData.id, "string", device.manufacturerData.id + "new");\r
+ }\r
+ }, "BluetoothLEManufacturerData_id_attribute");\r
+\r
+ //BluetoothLEServiceData_data_attribute\r
+ test(function () {\r
+ if (device.serviceData != null) {\r
+ check_attribute(device.serviceData, "data", device.serviceData.data, "string", device.serviceData.data + "new");\r
+ }\r
+ }, "BluetoothLEServiceData_data_attribute");\r
+\r
+ //BluetoothLEServiceData_uuid_attribute\r
+ test(function () {\r
+ if (device.serviceData != null) {\r
+ check_attribute(device.serviceData, "uuid", device.serviceData.uuid, "string", device.serviceData.uuid + "new");\r
+ check_not_nullable(device.serviceData, "uuid");\r
+ }\r
+ }, "BluetoothLEServiceData_uuid_attribute");\r
+\r
+ //BluetoothLEManufacturerData_extend\r
+ test(function () {\r
+ if (device.manufacturerData != null) {\r
+ check_extensibility(device.manufacturerData);\r
+ };\r
+ }, "BluetoothLEManufacturerData_extend");\r
+\r
+ //BluetoothLEServiceData_extend\r
+ test(function () {\r
+ if (device.serviceData != null) {\r
+ check_extensibility(device.serviceData);\r
+ };\r
+ }, "BluetoothLEServiceData_extend");\r
+ t.done();\r
+\r
+ })\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(function onsuccess(bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS) {\r
+ adapter.stopScan();\r
+ console.log("Found device: " + bledevice.name);\r
+ device = bledevice;\r
+ proccessDevice(device);\r
+ }\r
+ }, bleScanRrrorCallback);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Michal Bistyga <m.bistyga@samsung.com>
- Xiaoyan Qian <xy.qian@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEConnectChangeCallback_connection</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_connection
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,
- onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;
-
-t.step(function () {
- onConnectionStateChange = {
- onconnected: t.step_func(function (remotedevice) {
- //BluetoothLEConnectChangeCallback_onconnected
- test(function () {
- assert_type(remotedevice, "object", "device isn't an object");
- assert_type(remotedevice.address, "string", "address type check");
- assert_not_equals(remotedevice.address, null, "address should not be null");
- }, "BluetoothLEConnectChangeCallback_onconnected");
-
- }),
-
- ondisconnected: t.step_func(function (device) {
- //BluetoothLEConnectChangeCallback_ondisconnected
- test(function () {
- assert_type(device, "object", "device isn't an object");
- assert_type(device.address, "string", "address type check");
- assert_not_equals(device.address, null, "address should not be null");
- }, "BluetoothLEConnectChangeCallback_ondisconnected");
- setTimeout(function(){ //We can't call disconnect until all async tasks are finished.
- device.removeConnectStateChangeListener(watchID);
- t.done();}
- , 15000);
- })
- }
-
- onconnected = t.step_func(function (e) {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- watchID = device.addConnectStateChangeListener(onConnectionStateChange);
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Michal Bistyga <m.bistyga@samsung.com>\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_connection</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_connection\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,\r
+ onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;\r
+\r
+t.step(function () {\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (remotedevice) {\r
+ //BluetoothLEConnectChangeCallback_onconnected\r
+ test(function () {\r
+ assert_type(remotedevice, "object", "device isn't an object");\r
+ assert_type(remotedevice.address, "string", "address type check");\r
+ assert_not_equals(remotedevice.address, null, "address should not be null");\r
+ }, "BluetoothLEConnectChangeCallback_onconnected");\r
+\r
+ }),\r
+\r
+ ondisconnected: t.step_func(function (device) {\r
+ //BluetoothLEConnectChangeCallback_ondisconnected\r
+ test(function () {\r
+ assert_type(device, "object", "device isn't an object");\r
+ assert_type(device.address, "string", "address type check");\r
+ assert_not_equals(device.address, null, "address should not be null");\r
+ }, "BluetoothLEConnectChangeCallback_ondisconnected");\r
+ setTimeout(function(){ //We can't call disconnect until all async tasks are finished.\r
+ device.removeConnectStateChangeListener(watchID);\r
+ t.done();}\r
+ , 15000);\r
+ })\r
+ }\r
+\r
+ onconnected = t.step_func(function (e) {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ watchID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEConnectChangeCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_notexist
-//==== LABEL Check if interface BluetoothLEConnectChangeCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:BluetoothLEConnectChangeCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
- check_no_interface_object("BluetoothLEConnectChangeCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_notexist\r
+//==== LABEL Check if interface BluetoothLEConnectChangeCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:BluetoothLEConnectChangeCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_no_interface_object("BluetoothLEConnectChangeCallback");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEConnectChangeCallback_onconnected</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_onconnected
-//==== LABEL Check if BluetoothLEConnectChangeCallback onconnected is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,
- onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;
-
-t.step(function () {
- onConnectionStateChange = {
- onconnected: t.step_func(function (remotedevice) {
- assert_type(remotedevice, "object", "device isn't an object");
- assert_type(remotedevice.address, "string", "address type check");
- assert_not_equals(remotedevice.address, null, "address should not be null");
- device.removeConnectStateChangeListener(watchID);
- t.done();
- }),
-
- ondisconnected: t.step_func(function (device) {
- })
- }
-
- onconnected = t.step_func(function (e) {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- watchID = device.addConnectStateChangeListener(onConnectionStateChange);
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_onconnected</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_onconnected\r
+//==== LABEL Check if BluetoothLEConnectChangeCallback onconnected is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:onconnected M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,\r
+ onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;\r
+\r
+t.step(function () {\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (remotedevice) {\r
+ assert_type(remotedevice, "object", "device isn't an object");\r
+ assert_type(remotedevice.address, "string", "address type check");\r
+ assert_not_equals(remotedevice.address, null, "address should not be null");\r
+ device.removeConnectStateChangeListener(watchID);\r
+ t.done();\r
+ }),\r
+\r
+ ondisconnected: t.step_func(function (device) {\r
+ })\r
+ }\r
+\r
+ onconnected = t.step_func(function (e) {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ watchID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEConnectChangeCallback_ondisconnected</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEConnectChangeCallback_ondisconnected
-//==== LABEL Check if BluetoothLEConnectChangeCallback ondisconnected is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,
- onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;
-
-t.step(function () {
- onConnectionStateChange = {
- onconnected: t.step_func(function (device) {
- }),
-
- ondisconnected: t.step_func(function (remotedevice) {
- assert_type(remotedevice, "object", "device isn't an object");
- assert_type(remotedevice.address, "string", "address type check");
- assert_not_equals(remotedevice.address, null, "address should not be null");
- device.removeConnectStateChangeListener(watchID);
- t.done();
- })
- }
-
- onconnected = t.step_func(function (e) {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- watchID = device.addConnectStateChangeListener(onConnectionStateChange);
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEConnectChangeCallback_ondisconnected</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEConnectChangeCallback_ondisconnected\r
+//==== LABEL Check if BluetoothLEConnectChangeCallback ondisconnected is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEConnectChangeCallback:ondisconnected M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback,\r
+ onConnectionStateChange, watchID, flag = false, onconnected, onerror, device = null;\r
+\r
+t.step(function () {\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (device) {\r
+ }),\r
+\r
+ ondisconnected: t.step_func(function (remotedevice) {\r
+ assert_type(remotedevice, "object", "device isn't an object");\r
+ assert_type(remotedevice.address, "string", "address type check");\r
+ assert_not_equals(remotedevice.address, null, "address should not be null");\r
+ device.removeConnectStateChangeListener(watchID);\r
+ t.done();\r
+ })\r
+ }\r
+\r
+ onconnected = t.step_func(function (e) {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ watchID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener
-//==== LABEL Check if addConnectStateChangeListener method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,
- listenerID, device = null, flag = false, onerror, onconnected;
-
-t.step(function () {
- onConnectionStateChange = {
- onconnected: t.step_func(function (device) {
- assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");
- }),
- ondisconnected: t.step_func(function (device) {
- device.removeConnectStateChangeListener(listenerID);
- t.done();
- }),
- };
-
- onconnected = t.step_func(function () {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener\r
+//==== LABEL Check if addConnectStateChangeListener method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,\r
+ listenerID, device = null, flag = false, onerror, onconnected;\r
+\r
+t.step(function () {\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (device) {\r
+ assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");\r
+ }),\r
+ ondisconnected: t.step_func(function (device) {\r
+ device.removeConnectStateChangeListener(listenerID);\r
+ t.done();\r
+ }),\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch
-//==== LABEL Check whether addConnectStateChangeListener() method called with invalid listener argument throws an exception
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
- device = null, conversionTable, i, listener, exceptionName;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- conversionTable = getTypeConversionExceptions("object", false);
- for(i = 0; i < conversionTable.length; i++) {
- listener = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- device.addConnectStateChangeListener(listener);
- }, "Given incorrect listener.");
- };
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch\r
+//==== LABEL Check whether addConnectStateChangeListener() method called with invalid listener argument throws an exception\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+ device = null, conversionTable, i, listener, exceptionName;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ conversionTable = getTypeConversionExceptions("object", false);\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ listener = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ device.addConnectStateChangeListener(listener);\r
+ }, "Given incorrect listener.");\r
+ };\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_exist
-//==== LABEL Check if addConnectStateChangeListener method exists
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, listenerID, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_method_exists(device, "addConnectStateChangeListener");
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_exist\r
+//==== LABEL Check if addConnectStateChangeListener method exists\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, listenerID, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_method_exists(device, "addConnectStateChangeListener");\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb
-//==== LABEL Check addConnectStateChangeListener() with invalid callback
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTL
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, incorrectListeners, incorrectListener,
- device = null, exceptionName, i;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);
- for(i = 0; i < incorrectListeners.length; i++) {
- incorrectListener = incorrectListeners[i][0];
- exceptionName = incorrectListeners[i][1];
- assert_throws({name: exceptionName},
- function () {
- device.addConnectStateChangeListener(incorrectListener);
- }, "Given incorrect listener.");
- }
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb\r
+//==== LABEL Check addConnectStateChangeListener() with invalid callback\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTL\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, incorrectListeners, incorrectListener,\r
+ device = null, exceptionName, i;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);\r
+ for(i = 0; i < incorrectListeners.length; i++) {\r
+ incorrectListener = incorrectListeners[i][0];\r
+ exceptionName = incorrectListeners[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ device.addConnectStateChangeListener(incorrectListener);\r
+ }, "Given incorrect listener.");\r
+ }\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEDevice_addConnectStateChangeListener_missarg</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_missarg
-//==== LABEL Check addConnectStateChangeListener with missing non-optional argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- assert_throws (TYPE_MISMATCH_EXCEPTION,
- function () {
- device.addConnectStateChangeListener();
- }, "Method with non optional argument.");
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addConnectStateChangeListener_missarg</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_addConnectStateChangeListener_missarg\r
+//==== LABEL Check addConnectStateChangeListener with missing non-optional argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ assert_throws (TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.addConnectStateChangeListener();\r
+ }, "Method with non optional argument.");\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Michal Bistyga <m.bistyga@samsung.com>
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_addremoveConnectStateChangeListener_combined</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_add/removeConnectStateChangeListener_combined
-//==== LABEL Check BluetoothDevice attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MTL
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M
-//==== TEST_CRITERIA MAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== TEST_CRITERIA MAST MR
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter = null, bleScanSuccessCallback, bleScanErrorCallback, conversionTabl, retValue,
- onConnectionStateChange, flag = false, onconnected, onerror, device = null, listenerId, incorrectListeners, incorrectListener, exceptionName, i;
-
-t.step(function () {
- //BluetoothLEDevice_addConnectStateChangeListener
- onConnectionStateChange = {
- onconnected: t.step_func(function (remotedevice) {
- //BluetoothLEDevice_addConnectStateChangeListener
- test(function () {
- assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");
- }, "BluetoothLEDevice_addConnectStateChangeListener");
- }),
-
- ondisconnected: t.step_func(function (device) {
- //BluetoothLEDevice_removeConnectStateChangeListener_exist
- test(function () {
- check_method_exists(device, "removeConnectStateChangeListener");
- }, "BluetoothLEDevice_removeConnectStateChangeListener_exist");
- //BluetoothLEDevice_removeConnectStateChangeListener
- test(function () {
- retValue = device.removeConnectStateChangeListener(listenerID);
- assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");
- }, "BluetoothLEDevice_removeConnectStateChangeListener");
- t.done();
- })
- }
-
- onconnected = t.step_func(function (e) {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- //BluetoothLEDevice_addConnectStateChangeListener_exist
- test(function () {
- check_method_exists(device, "addConnectStateChangeListener");
- }, "BluetoothLEDevice_addConnectStateChangeListener_exist");
-
- //BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb
- test(function () {
- incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);
- for(i = 0; i < incorrectListeners.length; i++) {
- incorrectListener = incorrectListeners[i][0];
- exceptionName = incorrectListeners[i][1];
- assert_throws({name: exceptionName},
- function () {
- device.addConnectStateChangeListener(incorrectListener);
- }, "Given incorrect listener.");
- }
- }, "BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb");
-
- //BluetoothLEDevice_addConnectStateChangeListener_missarg
- test(function () {
- assert_throws (TYPE_MISMATCH_EXCEPTION,
- function () {
- device.addConnectStateChangeListener();
- }, "Method with non optional argument.");
- }, "BluetoothLEDevice_addConnectStateChangeListener_missarg");
-
- //BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch
- test(function () {
- conversionTable = getTypeConversionExceptions("object", false);
- for(i = 0; i < conversionTable.length; i++) {
- listener = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws({name: exceptionName},
- function () {
- device.addConnectStateChangeListener(listener);
- }, "Given incorrect listener.");
- };
- }, "BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch");
-
- listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+ Michal Bistyga <m.bistyga@samsung.com>\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_addremoveConnectStateChangeListener_combined</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_add/removeConnectStateChangeListener_combined\r
+//==== LABEL Check BluetoothDevice attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MTL\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:addConnectStateChangeListener M\r
+//==== TEST_CRITERIA MAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== TEST_CRITERIA MAST MR\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter = null, bleScanSuccessCallback, bleScanErrorCallback, conversionTabl, retValue,\r
+ onConnectionStateChange, flag = false, onconnected, onerror, device = null, listenerId, incorrectListeners, incorrectListener, exceptionName, i;\r
+\r
+t.step(function () {\r
+ //BluetoothLEDevice_addConnectStateChangeListener\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (remotedevice) {\r
+ //BluetoothLEDevice_addConnectStateChangeListener\r
+ test(function () {\r
+ assert_type(listenerID, "long", "addConnectStateChangeListener return type has wrong.");\r
+ }, "BluetoothLEDevice_addConnectStateChangeListener");\r
+ }),\r
+\r
+ ondisconnected: t.step_func(function (device) {\r
+ //BluetoothLEDevice_removeConnectStateChangeListener_exist\r
+ test(function () {\r
+ check_method_exists(device, "removeConnectStateChangeListener");\r
+ }, "BluetoothLEDevice_removeConnectStateChangeListener_exist");\r
+ //BluetoothLEDevice_removeConnectStateChangeListener\r
+ test(function () {\r
+ retValue = device.removeConnectStateChangeListener(listenerID);\r
+ assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");\r
+ }, "BluetoothLEDevice_removeConnectStateChangeListener");\r
+ t.done();\r
+ })\r
+ }\r
+\r
+ onconnected = t.step_func(function (e) {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ //BluetoothLEDevice_addConnectStateChangeListener_exist\r
+ test(function () {\r
+ check_method_exists(device, "addConnectStateChangeListener");\r
+ }, "BluetoothLEDevice_addConnectStateChangeListener_exist");\r
+\r
+ //BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb\r
+ test(function () {\r
+ incorrectListeners = getListenerConversionExceptions(["onconnected", "ondisconnected"]);\r
+ for(i = 0; i < incorrectListeners.length; i++) {\r
+ incorrectListener = incorrectListeners[i][0];\r
+ exceptionName = incorrectListeners[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ device.addConnectStateChangeListener(incorrectListener);\r
+ }, "Given incorrect listener.");\r
+ }\r
+ }, "BluetoothLEDevice_addConnectStateChangeListener_listener_invalid_cb");\r
+\r
+ //BluetoothLEDevice_addConnectStateChangeListener_missarg\r
+ test(function () {\r
+ assert_throws (TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.addConnectStateChangeListener();\r
+ }, "Method with non optional argument.");\r
+ }, "BluetoothLEDevice_addConnectStateChangeListener_missarg");\r
+\r
+ //BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch\r
+ test(function () {\r
+ conversionTable = getTypeConversionExceptions("object", false);\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ listener = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws({name: exceptionName},\r
+ function () {\r
+ device.addConnectStateChangeListener(listener);\r
+ }, "Given incorrect listener.");\r
+ };\r
+ }, "BluetoothLEDevice_addConnectStateChangeListener_TypeMismatch");\r
+\r
+ listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_address_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_address_attribute
-//==== LABEL Check address attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_address_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_address_attribute\r
+//==== LABEL Check address attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:address A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_readonly(device, "address", device.address, "string", REMOTE_BLE_DEVICE_ADDRESS + "Tizen");\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_appearance_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_appearance_attribute
-//==== LABEL Check appearance attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);
- t.done();
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_appearance_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_appearance_attribute\r
+//==== LABEL Check appearance attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:appearance A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_readonly(device, "appearance", device.appearance, "unsigned long", 1234);\r
+ t.done();\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect
-//==== LABEL Check if connect method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,
- onconnected, onerror;
-
-t.step(function () {
- onconnected = t.step_func(function (e) {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- retValue = device.connect(onconnected, onerror);
- assert_equals(retValue, undefined, "startScan returns wrong value");
- flag = true;
- t.done();
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect\r
+//==== LABEL Check if connect method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,\r
+ onconnected, onerror;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function (e) {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ retValue = device.connect(onconnected, onerror);\r
+ assert_equals(retValue, undefined, "startScan returns wrong value");\r
+ flag = true;\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!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:
- Lei Tang <lei312.tang@samsung.com>
- Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_combined</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_and_disconnect
-//==== LABEL Check if connect method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M
-//==== TEST_CRITERIA MMINA MAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M
-//==== TEST_CRITERIA CBOA CBT
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M
-//==== TEST_CRITERIA MNA MNAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MMINA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== TEST_CRITERIA MMINA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,
- onconnected, onerror, retValue;
-
-t.step(function () {
- onConnected = t.step_func(function () {
- device.disconnect();
- });
-
- onError = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
-
- //BluetoothLEAdapter_startScan MMINA MAST MR
- device = bledevice;
- test(function() {
- assert_equals(retValue, undefined, "startScan returns wrong value");
- }, "startScan");
-
- //BluetoothLEAdapter_startScan_InvalidStateError MC
- test(function() {
- var successCB1 = function () {
- assert_unreached("Invalid Success callback invoked");
- };
-
- var errorCB1 = function (e) {
- assert_unreached("Invalid Error callback invoked");
- };
-
- assert_throws({name: 'InvalidStateError'}, function () {
- adapter.startScan(successCB1, errorCB1);
- }, "InvalidStateError should be thrown when bluetooth is turned off");
- }, "startScan_InvalidStateError");
-
- // BluetoothLEScanCallback_onsuccess CBOA CBT
- test(function() {
- assert_type(bledevice, "object", "foundDevice isn't an object");
- assert_type(bledevice.address, "string", "address type check");
- assert_type(bledevice.name, "string", "name type check");
- assert_not_equals(bledevice.address, null, "address should not be null");
- }, "BluetoothLEScanCallback_onsuccess");
-
- //BluetoothLEAdapter_stopScan MNA MNAST MR
- test(function() {
- retValue = adapter.stopScan();
- assert_equals(retValue, undefined, "stopScan returns wrong value");
- }, "BluetoothLEAdapter_stopScan");
-
- //BluetoothLEDevice_connect ME
- test(function() {
- check_method_exists(device, "connect");
- }, "connect_exist");
-
- //connect_errorCallback_invalid_cb MTCB
- test(function() {
- var onconnected = function (e) {
- assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");
- };
- var onerror = {
- onerror: function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- }
- };
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, onerror);
- }, "Given incorrect errorCallback.");
- }, "connect_errorCallback_invalid_cb");
-
- //connect_errorCallback_TypeMismatch MC
- test(function() {
- var onconnected = function (e) {
- assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");
- };
- var conversionTable = getTypeConversionExceptions("functionObject", true);
-
- for(i = 0; i < conversionTable.length; i++) {
- var errorCallback = conversionTable[i][0];
- var exceptionName = conversionTable[i][1];
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- }, "connect_errorCallback_TypeMismatch");
-
- //connect_successCallback_invalid_cb MTCB
- test(function() {
- var onconnected = {
- onsuccess: function () {
- assert_unreached("Method connect shouldn't end successfully. This could affect other TCTs");
- }
- };
- var onerror = function (error) {
- assert_unreached("Invalid errorCallback invoked:" + error.name + ": " + error.message);
- };
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, onerror);
- }, "Given incorrect successCallback.");
- }, "connect_successCallback_invalid_cb");
-
- //connect_successCallback_TypeMismatch MC
- test(function() {
- var onerror = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
- var conversionTable = getTypeConversionExceptions("functionObject", true);
-
- for(i = 0; i < conversionTable.length; i++) {
- var onconnected = conversionTable[i][0];
- var exceptionName = conversionTable[i][1];
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, onerror);
- }, "Given incorrect successCallback.");
- }
- }, "connect_successCallback_TypeMismatch");
-
- //BluetoothLEDevice_extend OBX
- test(function() {
- check_extensibility(device);
- }, "BluetoothLEDevice_extend");
-
- //connect MMINA MR
- test(function() {
- if (flag == false) {
- retValue = device.connect(onConnected, onError);
- assert_equals(retValue, undefined, "connect returns wrong value");
- flag = true;
- t.done();
- }
- }, "connect");
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+ Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_combined</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_and_disconnect\r
+//==== LABEL Check if connect method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:startScan M\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:startScan M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M\r
+//==== TEST_CRITERIA CBOA CBT\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEAdapter:stopScan M\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MMINA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== TEST_CRITERIA MMINA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,\r
+ onconnected, onerror, retValue;\r
+\r
+t.step(function () {\r
+ onConnected = t.step_func(function () {\r
+ device.disconnect();\r
+ });\r
+\r
+ onError = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+\r
+ //BluetoothLEAdapter_startScan MMINA MAST MR\r
+ device = bledevice;\r
+ test(function() {\r
+ assert_equals(retValue, undefined, "startScan returns wrong value");\r
+ }, "startScan");\r
+\r
+ //BluetoothLEAdapter_startScan_InvalidStateError MC\r
+ test(function() {\r
+ var successCB1 = function () {\r
+ assert_unreached("Invalid Success callback invoked");\r
+ };\r
+\r
+ var errorCB1 = function (e) {\r
+ assert_unreached("Invalid Error callback invoked");\r
+ };\r
+\r
+ assert_throws({name: 'InvalidStateError'}, function () {\r
+ adapter.startScan(successCB1, errorCB1);\r
+ }, "InvalidStateError should be thrown when bluetooth is turned off");\r
+ }, "startScan_InvalidStateError");\r
+\r
+ // BluetoothLEScanCallback_onsuccess CBOA CBT\r
+ test(function() {\r
+ assert_type(bledevice, "object", "foundDevice isn't an object");\r
+ assert_type(bledevice.address, "string", "address type check");\r
+ assert_type(bledevice.name, "string", "name type check");\r
+ assert_not_equals(bledevice.address, null, "address should not be null");\r
+ }, "BluetoothLEScanCallback_onsuccess");\r
+\r
+ //BluetoothLEAdapter_stopScan MNA MNAST MR\r
+ test(function() {\r
+ retValue = adapter.stopScan();\r
+ assert_equals(retValue, undefined, "stopScan returns wrong value");\r
+ }, "BluetoothLEAdapter_stopScan");\r
+\r
+ //BluetoothLEDevice_connect ME\r
+ test(function() {\r
+ check_method_exists(device, "connect");\r
+ }, "connect_exist");\r
+\r
+ //connect_errorCallback_invalid_cb MTCB\r
+ test(function() {\r
+ var onconnected = function (e) {\r
+ assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");\r
+ };\r
+ var onerror = {\r
+ onerror: function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ }\r
+ };\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, onerror);\r
+ }, "Given incorrect errorCallback.");\r
+ }, "connect_errorCallback_invalid_cb");\r
+\r
+ //connect_errorCallback_TypeMismatch MC\r
+ test(function() {\r
+ var onconnected = function (e) {\r
+ assert_unreached("Method connect shouldn't end successfully. (This could affect other TCTs");\r
+ };\r
+ var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ var errorCallback = conversionTable[i][0];\r
+ var exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ }, "connect_errorCallback_TypeMismatch");\r
+\r
+ //connect_successCallback_invalid_cb MTCB\r
+ test(function() {\r
+ var onconnected = {\r
+ onsuccess: function () {\r
+ assert_unreached("Method connect shouldn't end successfully. This could affect other TCTs");\r
+ }\r
+ };\r
+ var onerror = function (error) {\r
+ assert_unreached("Invalid errorCallback invoked:" + error.name + ": " + error.message);\r
+ };\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, onerror);\r
+ }, "Given incorrect successCallback.");\r
+ }, "connect_successCallback_invalid_cb");\r
+\r
+ //connect_successCallback_TypeMismatch MC\r
+ test(function() {\r
+ var onerror = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+ var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ var onconnected = conversionTable[i][0];\r
+ var exceptionName = conversionTable[i][1];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, onerror);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ }, "connect_successCallback_TypeMismatch");\r
+\r
+ //BluetoothLEDevice_extend OBX\r
+ test(function() {\r
+ check_extensibility(device);\r
+ }, "BluetoothLEDevice_extend");\r
+\r
+ //connect MMINA MR\r
+ test(function() {\r
+ if (flag == false) {\r
+ retValue = device.connect(onConnected, onError);\r
+ assert_equals(retValue, undefined, "connect returns wrong value");\r
+ flag = true;\r
+ t.done();\r
+ }\r
+ }, "connect");\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_errorCallback_TypeMismatch
-//==== LABEL Check whether connect() method called with invalid errorCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, onconnected, errorCallback, SuccessCB, device = null, flag = false;
-
-t.step(function () {
-
- onconnected = t.step_func(function () {
- assert_unreached("Method connect shouldn't end successfully. Given incorrect errorCallback.");
- });
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag ==false) {
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, errorCallback);
- }, "Given incorrect errorCallback.");
- }
- flag = true;
- }
- t.done();
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_errorCallback_TypeMismatch\r
+//==== LABEL Check whether connect() method called with invalid errorCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, onconnected, errorCallback, SuccessCB, device = null, flag = false;\r
+\r
+t.step(function () {\r
+\r
+ onconnected = t.step_func(function () {\r
+ assert_unreached("Method connect shouldn't end successfully. Given incorrect errorCallback.");\r
+ });\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag ==false) {\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ flag = true;\r
+ }\r
+ t.done();\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_errorCallback_invalid_cb
-//==== LABEL Check connect() argument errorCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
- onconnected, onerror, flag = false, device = null;
-
-t.step(function () {
- onerror = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- onconnected = t.step_func(function (e) {
- assert_unreached("Method connect shouldn't end successfully.");
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag ==false) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, onerror);
- }, "Given incorrect errorCallback.");
- flag = true;
- }
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- retValue = adapter.startScan(SuccessCB);
-
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_errorCallback_invalid_cb\r
+//==== LABEL Check connect() argument errorCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+ onconnected, onerror, flag = false, device = null;\r
+\r
+t.step(function () {\r
+ onerror = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ onconnected = t.step_func(function (e) {\r
+ assert_unreached("Method connect shouldn't end successfully.");\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag ==false) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, onerror);\r
+ }, "Given incorrect errorCallback.");\r
+ flag = true;\r
+ }\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ retValue = adapter.startScan(SuccessCB);\r
+\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_exist
-//==== LABEL Method of connect exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_method_exists(device, "connect");
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_exist\r
+//==== LABEL Method of connect exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_method_exists(device, "connect");\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_successCallback_TypeMismatch
-//==== LABEL Check whether connect() method called with invalid successCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- conversionTable, onconnected, onerror, SuccessCB, device = null, flag = false;
-
-t.step(function () {
-
- onerror = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag ==false) {
- for(i = 0; i < conversionTable.length; i++) {
- onconnected = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, onerror);
- }, "Given incorrect successCallback.");
- }
- flag = true;
- }
- t.done();
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_successCallback_TypeMismatch\r
+//==== LABEL Check whether connect() method called with invalid successCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ conversionTable, onconnected, onerror, SuccessCB, device = null, flag = false;\r
+\r
+t.step(function () {\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag ==false) {\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ onconnected = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, onerror);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ flag = true;\r
+ }\r
+ t.done();\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_successCallback_invalid_cb
-//==== LABEL Check connect() argument successCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,
- onconnected, onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method connect shouldn't end successfully.");
- })
- };
-
- onerror = t.step_func(function (e) {
- assert_unreached("errorCB exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag ==false) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.connect(onconnected, onerror);
- }, "Given incorrect successCallback.");
- flag = true;
- }
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- retValue = adapter.startScan(SuccessCB);
-
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_successCallback_invalid_cb\r
+//==== LABEL Check connect() argument successCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB,\r
+ onconnected, onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method connect shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("errorCB exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag ==false) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.connect(onconnected, onerror);\r
+ }, "Given incorrect successCallback.");\r
+ flag = true;\r
+ }\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ retValue = adapter.startScan(SuccessCB);\r
+\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_connect_with_errorcallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_with_errorcallback
-//==== LABEL Check if connect method work properly of BluetoothLEDevice(with optional argument)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
- onerror, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- assert_equals(retValue, undefined, "connect returns wrong value");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- retValue = device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_connect_with_errorcallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_with_errorcallback\r
+//==== LABEL Check if connect method work properly of BluetoothLEDevice(with optional argument)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+ onerror, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ assert_equals(retValue, undefined, "connect returns wrong value");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ retValue = device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect
-//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(without optional argument)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
- retValue = null, onerror, device, flag = false, device = null;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- retValue = device.disconnect();
- assert_equals(retValue, undefined, "connect returns wrong value");
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect\r
+//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(without optional argument)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+ retValue = null, onerror, device, flag = false, device = null;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ retValue = device.disconnect();\r
+ assert_equals(retValue, undefined, "connect returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_InvalidStateError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_InvalidStateError
-//==== LABEL Check if disconnect method could throw InvalidStateError exception when device is not connected
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, ondisconnectsuccess, ondisconnecterror,
- device = null, onerror;
-
-t.step(function () {
- ondisconnectsuccess = t.step_func(function () {
- assert_unreached("Invalid Success callback invoked");
- });
-
- ondisconnecterror = t.step_func(function (e) {
- assert_unreached("Invalid Error callback invoked");
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- assert_throws({name: 'InvalidStateError'}, function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "InvalidStateError should be thrown with device is not connected");
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_InvalidStateError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_InvalidStateError\r
+//==== LABEL Check if disconnect method could throw InvalidStateError exception when device is not connected\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, ondisconnectsuccess, ondisconnecterror,\r
+ device = null, onerror;\r
+\r
+t.step(function () {\r
+ ondisconnectsuccess = t.step_func(function () {\r
+ assert_unreached("Invalid Success callback invoked");\r
+ });\r
+\r
+ ondisconnecterror = t.step_func(function (e) {\r
+ assert_unreached("Invalid Error callback invoked");\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ assert_throws({name: 'InvalidStateError'}, function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "InvalidStateError should be thrown with device is not connected");\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!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:
- Lei Tang <lei312.tang@samsung.com>
- Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_combined</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_connect_and_disconnect
-//==== LABEL Check if connect method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MTCB
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== TEST_CRITERIA MMINA MAST MR
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,
- onConnected, onError;
-
-t.step(function () {
- onConnected = t.step_func(function () {
- // BluetoothLEDevice_disconnect_exist ME
- test(function() {
- check_method_exists(device, "disconnect");
- }, "disconnect_exist");
-
- //BluetoothLEDevice_disconnect_successCallback_invalid_cb MTCB
- test(function() {
- var ondisconnectsuccess = {
- onsuccess: function () {
- assert_unreached("Method disconnect shouldn't end successfully.");
- }
- };
-
- ondisconnecterror = function (e) {
- assert_unreached("errorCB exception:" + e.message);
- };
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect successCallback.");
- }, "disconnectsuccessCallback_invalid_cb");
-
- // BluetoothLEDevice_disconnect_errorCallback_invalid_cb MTCB
- test(function() {
- var ondisconnecterror = {
- onerror: function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- }
- };
- var ondisconnectsuccess = function (e) {
- assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");
- };
-
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect errorCallback.");
- }, "disconnect_errorCallback_invalid_cb");
-
- // BluetoothLEDevice_disconnect_errorCallback_TypeMismatch MC
- test(function() {
- var ondisconnectsuccess = function() {
- assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");
- }
- var conversionTable = getTypeConversionExceptions("functionObject", true);
-
- for (i = 0; i < conversionTable.length; i++) {
- var ondisconnecterror = conversionTable[i][0];
- var exceptionName = conversionTable[i][1];
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect errorCallback.");
- }
- }, "disconnect_errorCallback_TypeMismatch" );
-
- //BluetoothLEDevice_disconnect_successCallback_TypeMismatch MC
- test(function() {
- var ondisconnecterror = function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- }
- var conversionTable = getTypeConversionExceptions("functionObject", true);
-
- for(i = 0; i < conversionTable.length; i++) {
- var ondisconnectsuccess = conversionTable[i][0];
- var exceptionName = conversionTable[i][1];
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect successCallback.");
- }
- }, "disconnect_successCallback_TypeMismatch");
-
- //BluetoothLEDevice_disconnect MMINA MAST MR
- test(function() {
- retValue = device.disconnect();
- assert_equals(retValue, undefined, "connect returns wrong value");
- }, "disconnect");
-
- t.done();
- });
-
- onError = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
-
- //BluetoothLEDevice_disconnect_InvalidStateError MC
- test(function() {
- var ondisconnectsuccess = function () {
- assert_unreached("Invalid Success callback invoked. This could affect other TCTs");
- };
- var ondisconnecterror = function (e) {
- assert_unreached("Invalid Error callback invoked");
- };
-
- assert_throws({name: 'InvalidStateError'}, function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "InvalidStateError should be thrown with device is not connected");
- }, "disconnect_InvalidStateError");
-
- if (flag == false) {
- device.connect(onConnected, onError);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- retValue = adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+ Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_combined</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_connect_and_disconnect\r
+//==== LABEL Check if connect method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:connect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MTCB\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== TEST_CRITERIA MMINA MAST MR\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, flag = false,\r
+ onConnected, onError;\r
+\r
+t.step(function () {\r
+ onConnected = t.step_func(function () {\r
+ // BluetoothLEDevice_disconnect_exist ME\r
+ test(function() {\r
+ check_method_exists(device, "disconnect");\r
+ }, "disconnect_exist");\r
+\r
+ //BluetoothLEDevice_disconnect_successCallback_invalid_cb MTCB\r
+ test(function() {\r
+ var ondisconnectsuccess = {\r
+ onsuccess: function () {\r
+ assert_unreached("Method disconnect shouldn't end successfully.");\r
+ }\r
+ };\r
+\r
+ ondisconnecterror = function (e) {\r
+ assert_unreached("errorCB exception:" + e.message);\r
+ };\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect successCallback.");\r
+ }, "disconnectsuccessCallback_invalid_cb");\r
+\r
+ // BluetoothLEDevice_disconnect_errorCallback_invalid_cb MTCB\r
+ test(function() {\r
+ var ondisconnecterror = {\r
+ onerror: function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ }\r
+ };\r
+ var ondisconnectsuccess = function (e) {\r
+ assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");\r
+ };\r
+\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect errorCallback.");\r
+ }, "disconnect_errorCallback_invalid_cb");\r
+\r
+ // BluetoothLEDevice_disconnect_errorCallback_TypeMismatch MC\r
+ test(function() {\r
+ var ondisconnectsuccess = function() {\r
+ assert_unreached("Method disconnect shouldn't end successfully. This could affect other TCTs");\r
+ }\r
+ var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ var ondisconnecterror = conversionTable[i][0];\r
+ var exceptionName = conversionTable[i][1];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ }, "disconnect_errorCallback_TypeMismatch" );\r
+\r
+ //BluetoothLEDevice_disconnect_successCallback_TypeMismatch MC\r
+ test(function() {\r
+ var ondisconnecterror = function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ }\r
+ var conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ var ondisconnectsuccess = conversionTable[i][0];\r
+ var exceptionName = conversionTable[i][1];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ }, "disconnect_successCallback_TypeMismatch");\r
+\r
+ //BluetoothLEDevice_disconnect MMINA MAST MR\r
+ test(function() {\r
+ retValue = device.disconnect();\r
+ assert_equals(retValue, undefined, "connect returns wrong value");\r
+ }, "disconnect");\r
+\r
+ t.done();\r
+ });\r
+\r
+ onError = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+\r
+ //BluetoothLEDevice_disconnect_InvalidStateError MC\r
+ test(function() {\r
+ var ondisconnectsuccess = function () {\r
+ assert_unreached("Invalid Success callback invoked. This could affect other TCTs");\r
+ };\r
+ var ondisconnecterror = function (e) {\r
+ assert_unreached("Invalid Error callback invoked");\r
+ };\r
+\r
+ assert_throws({name: 'InvalidStateError'}, function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "InvalidStateError should be thrown with device is not connected");\r
+ }, "disconnect_InvalidStateError");\r
+\r
+ if (flag == false) {\r
+ device.connect(onConnected, onError);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ retValue = adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_errorCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_errorCallback_TypeMismatch
-//==== LABEL Check whether disconnect() method called with invalid errorCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
- exceptionName, i, conversionTable, device = null, flag = false;
-
-t.step(function () {
- ondisconnectsuccess = t.step_func(function () {
- assert_unreached("Method disconnect shouldn't end successfully. Given incorrect errorCallback.");
- });
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
- onconnected = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- ondisconnecterror = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect errorCallback.");
- }
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_errorCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_errorCallback_TypeMismatch\r
+//==== LABEL Check whether disconnect() method called with invalid errorCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+ exceptionName, i, conversionTable, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ ondisconnectsuccess = t.step_func(function () {\r
+ assert_unreached("Method disconnect shouldn't end successfully. Given incorrect errorCallback.");\r
+ });\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ onconnected = t.step_func(function () {\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ ondisconnecterror = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_errorCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_errorCallback_invalid_cb
-//==== LABEL Check disconnect() argument errorCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
- device = null, flag = false;
-
-t.step(function () {
- ondisconnecterror = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- ondisconnectsuccess = t.step_func(function (e) {
- assert_unreached("Method disconnect shouldn't end successfully.");
- });
-
- onconnected = t.step_func(function () {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect errorCallback.");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_errorCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_errorCallback_invalid_cb\r
+//==== LABEL Check disconnect() argument errorCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ ondisconnecterror = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ ondisconnectsuccess = t.step_func(function (e) {\r
+ assert_unreached("Method disconnect shouldn't end successfully.");\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect errorCallback.");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_exist
-//==== LABEL Method of disconnect exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- check_method_exists(device, "disconnect");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_exist\r
+//==== LABEL Method of disconnect exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ check_method_exists(device, "disconnect");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_successCallback_TypeMismatch</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_successCallback_TypeMismatch
-//==== LABEL Check whether disconnect() method called with invalid successCallback argument throws an exception
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
- exceptionName, i, conversionTable, device = null, flag = false;
-
-t.step(function () {
- ondisconnecterror = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- conversionTable = getTypeConversionExceptions("functionObject", true);
- onconnected = t.step_func(function () {
- for(i = 0; i < conversionTable.length; i++) {
- ondisconnectsuccess = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect successCallback.");
- }
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_successCallback_TypeMismatch</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_successCallback_TypeMismatch\r
+//==== LABEL Check whether disconnect() method called with invalid successCallback argument throws an exception\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+ exceptionName, i, conversionTable, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ ondisconnecterror = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ onconnected = t.step_func(function () {\r
+ for(i = 0; i < conversionTable.length; i++) {\r
+ ondisconnectsuccess = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_successCallback_invalid_cb</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_successCallback_invalid_cb
-//==== LABEL Check disconnect() argument successCallback validation - use simple function
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
- device = null, flag = false;
-
-t.step(function () {
- ondisconnectsuccess = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method disconnect shouldn't end successfully.");
- })
- };
-
- ondisconnecterror = t.step_func(function (e) {
- assert_unreached("errorCB exception:" + e.message);
- });
-
- onconnected = t.step_func(function () {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- device.disconnect(ondisconnectsuccess, ondisconnecterror);
- }, "Given incorrect successCallback.");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_successCallback_invalid_cb</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_successCallback_invalid_cb\r
+//==== LABEL Check disconnect() argument successCallback validation - use simple function\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ ondisconnectsuccess = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method disconnect shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ ondisconnecterror = t.step_func(function (e) {\r
+ assert_unreached("errorCB exception:" + e.message);\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ }, "Given incorrect successCallback.");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_disconnect_with_errorCallback</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_disconnect_with_errorCallback
-//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(with optional argument)
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,
- retValue = null, device = null, flag = false;
-
-t.step(function () {
- ondisconnectsuccess = t.step_func(function () {
- assert_equals(retValue, undefined, "disconnect returns wrong value");
- t.done();
- });
-
- ondisconnecterror = t.step_func(function (e) {
- assert_unreached("disconnect errorCallback exception:" + e.message);
- });
-
- onconnected = t.step_func(function () {
- retValue = device.disconnect(ondisconnectsuccess, ondisconnecterror);
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_disconnect_with_errorCallback</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_disconnect_with_errorCallback\r
+//==== LABEL Check if disconnect method work properly with BluetoothLEDevice(with optional argument)\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:disconnect M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, ondisconnectsuccess, ondisconnecterror, onerror,\r
+ retValue = null, device = null, flag = false;\r
+\r
+t.step(function () {\r
+ ondisconnectsuccess = t.step_func(function () {\r
+ assert_equals(retValue, undefined, "disconnect returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ ondisconnecterror = t.step_func(function (e) {\r
+ assert_unreached("disconnect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ retValue = device.disconnect(ondisconnectsuccess, ondisconnecterror);\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_extend
-//==== LABEL Test whether the object can have new properties added for BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;
-
-t.step(function () {
- SuccessCB = t.step_func(function (device) {
- check_extensibility(device);
- adapter.stopScan();
- t.done();
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_extend\r
+//==== LABEL Test whether the object can have new properties added for BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:BluetoothLEDevice U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (device) {\r
+ check_extensibility(device);\r
+ adapter.stopScan();\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService
-//==== LABEL Check if getService method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- assert_type(service, "object", "method returned object type");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService\r
+//==== LABEL Check if getService method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ assert_type(service, "object", "method returned object type");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getServiceAllUuids</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getServiceAllUuids
-//==== LABEL Check if getServiceAllUuids method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- service = device.getServiceAllUuids();
- assert_type(service, "array", "method returned array type");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getServiceAllUuids</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getServiceAllUuids\r
+//==== LABEL Check if getServiceAllUuids method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ service = device.getServiceAllUuids();\r
+ assert_type(service, "array", "method returned array type");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getServiceAllUuids_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getServiceAllUuids_exist
-//==== LABEL Method of getServiceAllUuids exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- check_method_exists(device, "getServiceAllUuids");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getServiceAllUuids_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getServiceAllUuids_exist\r
+//==== LABEL Method of getServiceAllUuids exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ check_method_exists(device, "getServiceAllUuids");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2016 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getServiceAllUuids_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getServiceAllUuids_extra_argument
-//==== LABEL Check if method getServiceAllUuids of BluetoothLEDevice accepts extra argument
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- checkExtraArgument(device, "getServiceAllUuids");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2016 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getServiceAllUuids_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getServiceAllUuids_extra_argument\r
+//==== LABEL Check if method getServiceAllUuids of BluetoothLEDevice accepts extra argument\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ checkExtraArgument(device, "getServiceAllUuids");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_NotFoundError</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_NotFoundError
-//==== LABEL Check getService method of BluetoothLEDevice interface could be throw NotFoundError
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service, id, ids,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- id = device.uuids[0];
- ids = id + "Tizen";
- assert_throws(NOT_FOUND_EXCEPTION, function () {
- device.getService(ids);
- }, "Not given any argument.");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_NotFoundError</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_NotFoundError\r
+//==== LABEL Check getService method of BluetoothLEDevice interface could be throw NotFoundError\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service, id, ids,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ id = device.uuids[0];\r
+ ids = id + "Tizen";\r
+ assert_throws(NOT_FOUND_EXCEPTION, function () {\r
+ device.getService(ids);\r
+ }, "Not given any argument.");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!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:
- Lei Tang <lei312.tang@samsung.com>
- Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_combined</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_combined
-//==== LABEL Check if getService method work properly with BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== TEST_CRITERIA MNA MR
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M
-//==== TEST_CRITERIA MNAEX
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- //BluetoothLEDevice_getService MAST MR
- test(function() {
- service = device.getService(device.uuids[0]);
- assert_type(service, "object", "method returned object type");
- }, "getService");
-
- //getService_exist ME
- test(function() {
- check_method_exists(device, "getService");
- }, "getService_exists");
-
- //getService_misarg MMA
- test(function () {
- assert_throws({name: 'NotFoundError'}, function () {
- device.getService();
- }, "Not given any argument.");
- }, "getService_misarg");
-
- //getServiceAllUuids MNA MR
- test(function() {
- service = device.getServiceAllUuids();
- assert_type(service, "array", "method returned array type");
- }, "getServiceAllUuids");
-
- //getServiceAllUuids_exist ME
- test(function() {
- check_method_exists(device, "getServiceAllUuids");
- }, "getServiceAllUuids_exist");
-
- //getService_NotFoundError MC
- test(function() {
- id = device.uuids[0];
- ids = id + "Tizen";
- assert_throws(NOT_FOUND_EXCEPTION, function () {
- device.getService(ids);
- }, "Not given any argument.");
- }, "getService_NotFoundError");
-
- //getServiceAllUuids_extra_argument MNAEX
- test(function() {
- checkExtraArgument(device, "getServiceAllUuids");
- }, "getServiceAllUuids_extra_argument");
-
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2017 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+ Pawel Kaczmarczyk <p.kaczmarczy@partner.samsung.com>>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_combined</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_combined\r
+//==== LABEL Check if getService method work properly with BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== TEST_CRITERIA MNA MR\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getServiceAllUuids M\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ //BluetoothLEDevice_getService MAST MR\r
+ test(function() {\r
+ service = device.getService(device.uuids[0]);\r
+ assert_type(service, "object", "method returned object type");\r
+ }, "getService");\r
+\r
+ //getService_exist ME\r
+ test(function() {\r
+ check_method_exists(device, "getService");\r
+ }, "getService_exists");\r
+\r
+ //getService_misarg MMA\r
+ test(function () {\r
+ assert_throws({name: 'NotFoundError'}, function () {\r
+ device.getService();\r
+ }, "Not given any argument.");\r
+ }, "getService_misarg");\r
+\r
+ //getServiceAllUuids MNA MR\r
+ test(function() {\r
+ service = device.getServiceAllUuids();\r
+ assert_type(service, "array", "method returned array type");\r
+ }, "getServiceAllUuids");\r
+\r
+ //getServiceAllUuids_exist ME\r
+ test(function() {\r
+ check_method_exists(device, "getServiceAllUuids");\r
+ }, "getServiceAllUuids_exist");\r
+\r
+ //getService_NotFoundError MC\r
+ test(function() {\r
+ id = device.uuids[0];\r
+ ids = id + "Tizen";\r
+ assert_throws(NOT_FOUND_EXCEPTION, function () {\r
+ device.getService(ids);\r
+ }, "Not given any argument.");\r
+ }, "getService_NotFoundError");\r
+\r
+ //getServiceAllUuids_extra_argument MNAEX\r
+ test(function() {\r
+ checkExtraArgument(device, "getServiceAllUuids");\r
+ }, "getServiceAllUuids_extra_argument");\r
+\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_exist
-//==== LABEL Method of getService exists in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- check_method_exists(device, "getService");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_exist\r
+//==== LABEL Method of getService exists in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ check_method_exists(device, "getService");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_getService_misarg</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_getService_misarg
-//==== LABEL Check getService method of BluetoothLEDevice interface with missing all argument
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P2
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMA
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,
- device = null, flag = false;
-
-t.step(function () {
- onconnected = t.step_func(function () {
- assert_throws({name: 'NotFoundError'}, function () {
- device.getService();
- }, "Not given any argument.");
- device.disconnect();
- t.done();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_getService_misarg</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_getService_misarg\r
+//==== LABEL Check getService method of BluetoothLEDevice interface with missing all argument\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P2\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:getService M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMA\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onconnected, service,\r
+ device = null, flag = false;\r
+\r
+t.step(function () {\r
+ onconnected = t.step_func(function () {\r
+ assert_throws({name: 'NotFoundError'}, function () {\r
+ device.getService();\r
+ }, "Not given any argument.");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_includeName_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_includeName_attribute
-//==== LABEL Check includeName attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeName A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;
-
-t.step(function () {
- SuccessCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
- check_readonly(device, "includeName", device.includeName, "string", REMOTE_DEVICE_NAME + "Tizen");
- t.done();
- }
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_includeName_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_includeName_attribute\r
+//==== LABEL Check includeName attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeName A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;\r
+\r
+t.step(function () {\r
+ SuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ check_readonly(device, "includeName", device.includeName, "string", REMOTE_DEVICE_NAME + "Tizen");\r
+ t.done();\r
+ }\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_includeTxPowerLevel_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_includeTxPowerLevel_attribute
-//==== LABEL Check includeTxPowerLevel attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeTxPowerLevel A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;
-
-t.step(function () {
- SuccessCB = {
- onstarted: t.step_func(function () {
- }),
- ondevicefound: t.step_func(function (device) {
- if(device.address == REMOTE_BLE_DEVICE_ADDRESS){
- check_readonly(device, "includeTxPowerLevel", device.includeTxPowerLevel, "unsigned long", 1234);
- t.done();
- }
- }),
- onfinished: t.step_func(function (devices) {
- })
- };
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_includeTxPowerLevel_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_includeTxPowerLevel_attribute\r
+//==== LABEL Check includeTxPowerLevel attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:includeTxPowerLevel A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB;\r
+\r
+t.step(function () {\r
+ SuccessCB = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+ ondevicefound: t.step_func(function (device) {\r
+ if(device.address == REMOTE_BLE_DEVICE_ADDRESS){\r
+ check_readonly(device, "includeTxPowerLevel", device.includeTxPowerLevel, "unsigned long", 1234);\r
+ t.done();\r
+ }\r
+ }),\r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_manufacturerData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_manufacturerData_attribute
-//==== LABEL Check manufacturerData attribute in BluetoothLEDevice is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmp;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- if (device.manufacturerData == null) {
- t.done();
- } else {
- tmp = device.manufacturerData;
- device.manufacturerData = new tizen.BluetoothLEManufacturerData("127", "0x0057");
- assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");
- assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");
- t.done();
- }
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_manufacturerData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_manufacturerData_attribute\r
+//==== LABEL Check manufacturerData attribute in BluetoothLEDevice is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:manufacturerData A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmp;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ if (device.manufacturerData == null) {\r
+ t.done();\r
+ } else {\r
+ tmp = device.manufacturerData;\r
+ device.manufacturerData = new tizen.BluetoothLEManufacturerData("127", "0x0057");\r
+ assert_equals(device.manufacturerData.id, tmp.id, "ManufacturerData can be modified.");\r
+ assert_equals(device.manufacturerData.data, tmp.data, "ManufacturerData can be modified.");\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_name_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_name_attribute
-//==== LABEL Check name attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");
- t.done();
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_name_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_name_attribute\r
+//==== LABEL Check name attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:name A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_readonly(device, "name", device.name, "string", REMOTE_DEVICE_NAME + "Tizen");\r
+ t.done();\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_notexist
-//==== LABEL Check if is possible to call BluetoothLEDevice in new expresion
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA NIO
-
-test(function () {
- check_no_interface_object("BluetoothLEDevice");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_notexist\r
+//==== LABEL Check if is possible to call BluetoothLEDevice in new expresion\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA NIO\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_no_interface_object("BluetoothLEDevice");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_removeConnectStateChangeListener</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener
-//==== LABEL Check if removeConnectStateChangeListener method work properly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MAST MR
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,
- listenerID, retValue, device = null, flag = false, onconnected, onerror;
-
-t.step(function () {
- onConnectionStateChange = {
- onconnected: t.step_func(function (device) {
- retValue = device.removeConnectStateChangeListener(listenerID);
- assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");
- t.done();
- }),
- ondisconnected: t.step_func(function (device) {
- }),
- };
-
- onconnected = t.step_func(function () {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_removeConnectStateChangeListener</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener\r
+//==== LABEL Check if removeConnectStateChangeListener method work properly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MAST MR\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,\r
+ listenerID, retValue, device = null, flag = false, onconnected, onerror;\r
+\r
+t.step(function () {\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (device) {\r
+ retValue = device.removeConnectStateChangeListener(listenerID);\r
+ assert_equals(retValue, undefined, "removeConnectStateChangeListener returns wrong value");\r
+ t.done();\r
+ }),\r
+ ondisconnected: t.step_func(function (device) {\r
+ }),\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_removeConnectStateChangeListener_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener_exist
-//==== LABEL Check if removeConnectStateChangeListener method exists
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,
- listenerID, device = null, flag = false, onconnected, onerror;
-
-t.step(function () {
- onConnectionStateChange = {
- onconnected: t.step_func(function (device) {
- }),
- ondisconnected: t.step_func(function (device) {
- check_method_exists(device, "removeConnectStateChangeListener");
- t.done();
- }),
- };
-
- onconnected = t.step_func(function () {
- device.disconnect();
- });
-
- onerror = t.step_func(function (e) {
- assert_unreached("connect errorCallback exception:" + e.message);
- });
-
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- listenerID = device.addConnectStateChangeListener(onConnectionStateChange);
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_removeConnectStateChangeListener_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_removeConnectStateChangeListener_exist\r
+//==== LABEL Check if removeConnectStateChangeListener method exists\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:removeConnectStateChangeListener M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, onConnectionStateChange,\r
+ listenerID, device = null, flag = false, onconnected, onerror;\r
+\r
+t.step(function () {\r
+ onConnectionStateChange = {\r
+ onconnected: t.step_func(function (device) {\r
+ }),\r
+ ondisconnected: t.step_func(function (device) {\r
+ check_method_exists(device, "removeConnectStateChangeListener");\r
+ t.done();\r
+ }),\r
+ };\r
+\r
+ onconnected = t.step_func(function () {\r
+ device.disconnect();\r
+ });\r
+\r
+ onerror = t.step_func(function (e) {\r
+ assert_unreached("connect errorCallback exception:" + e.message);\r
+ });\r
+\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ listenerID = device.addConnectStateChangeListener(onConnectionStateChange);\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_rssi_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_rssi_attribute
-//==== LABEL Check rssi attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_readonly(device, "rssi", device.rssi, "long", -1024);
- t.done();
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_rssi_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_rssi_attribute\r
+//==== LABEL Check rssi attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:rssi A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_readonly(device, "rssi", device.rssi, "long", -1024);\r
+ t.done();\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_serviceData_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_serviceData_attribute
-//==== LABEL Check serviceData attribute in BluetoothLEDevice is readonly
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_readonly(device, "serviceData", device.serviceData, "array", 123);
- t.done();
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_serviceData_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_serviceData_attribute\r
+//==== LABEL Check serviceData attribute in BluetoothLEDevice is readonly\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:serviceData A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_readonly(device, "serviceData", device.serviceData, "array", 123);\r
+ t.done();\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_solicitationuuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_solicitationuuids_attribute
-//==== LABEL Check solicitationuuids attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpSoUuids = [123];
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");
- if (device.solicitationuuids != null) {
- assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");
- device.solicitationuuids = tmpSoUuids;
- assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");
- t.done();
- } else {
- t.done();
- }
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_solicitationuuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_solicitationuuids_attribute\r
+//==== LABEL Check solicitationuuids attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:solicitationuuids A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpSoUuids = [123];\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ assert_own_property(device, "solicitationuuids", "BluetoothLEDevice does not own solicitationuuids property.");\r
+ if (device.solicitationuuids != null) {\r
+ assert_type(device.solicitationuuids, "array", "solicitationuuids should be an array");\r
+ device.solicitationuuids = tmpSoUuids;\r
+ assert_not_equals(device.solicitationuuids, tmpSoUuids, "solicitationuuids should not be modified");\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_txPowerLevel_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_txPowerLevel_attribute
-//==== LABEL Check txPowerLevel attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);
- t.done();
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_txPowerLevel_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_txPowerLevel_attribute\r
+//==== LABEL Check txPowerLevel attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:txpowerlevel A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null;\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ check_readonly(device, "txpowerlevel", device.txpowerlevel, "long", 1234);\r
+ t.done();\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothLEDevice_uuids_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEDevice_uuids_attribute
-//==== LABEL Check uuids attribute in BluetoothLEDevice
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpUuids = [123];
-
-t.step(function () {
- SuccessCB = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");
- if (device.uuids != null) {
- assert_type(device.uuids, "array", "uuids should be an array");
- device.uuids = tmpUuids;
- assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");
- t.done();
- } else {
- t.done();
- }
- }
- });
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(SuccessCB);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEDevice_uuids_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEDevice_uuids_attribute\r
+//==== LABEL Check uuids attribute in BluetoothLEDevice\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEDevice:uuids A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), SuccessCB, device = null, tmpUuids = [123];\r
+\r
+t.step(function () {\r
+ SuccessCB = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ assert_own_property(device, "uuids", "BluetoothLEDevice does not own uuids property.");\r
+ if (device.uuids != null) {\r
+ assert_type(device.uuids, "array", "uuids should be an array");\r
+ device.uuids = tmpUuids;\r
+ assert_not_equals(device.uuids, tmpUuids, "uuids should not be modified");\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(SuccessCB);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEManufacturerData_data_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEManufacturerData_data_attribute
-//==== LABEL Check if BluetoothLEManufacturerData::data attribute exists, has type string and can be modified
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- manufacturerData, device = null;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- manufacturerData = device.manufacturerData;
- if (manufacturerData != null) {
- check_attribute(manufacturerData, "data", manufacturerData.data, "string", manufacturerData.data + "new");
- t.done();
- } else {
- t.done();
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEManufacturerData_data_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEManufacturerData_data_attribute\r
+//==== LABEL Check if BluetoothLEManufacturerData::data attribute exists, has type string and can be modified\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:data A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ manufacturerData, device = null;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ manufacturerData = device.manufacturerData;\r
+ if (manufacturerData != null) {\r
+ check_attribute(manufacturerData, "data", manufacturerData.data, "string", manufacturerData.data + "new");\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEManufacturerData_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEManufacturerData_extend
-//==== LABEL Check if BluetoothLEManufacturerData is extendable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- manufacturerData, device = null;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- manufacturerData = device.manufacturerData;
- if (manufacturerData != null) {
- check_extensibility(manufacturerData);
- t.done();
- } else {
- t.done();
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEManufacturerData_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEManufacturerData_extend\r
+//==== LABEL Check if BluetoothLEManufacturerData is extendable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:BluetoothLEManufacturerData U\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ manufacturerData, device = null;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ manufacturerData = device.manufacturerData;\r
+ if (manufacturerData != null) {\r
+ check_extensibility(manufacturerData);\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEManufacturerData_id_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEManufacturerData_id_attribute
-//==== LABEL Check if BluetoothLEManufacturerData::id attribute exists, has type string and can be modified
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- manufacturerData, device = null;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- manufacturerData = device.manufacturerData;
- if (manufacturerData != null) {
- check_attribute(manufacturerData, "id", manufacturerData.id, "string", manufacturerData.id + "new");
- t.done();
- } else {
- t.done();
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEManufacturerData_id_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEManufacturerData_id_attribute\r
+//==== LABEL Check if BluetoothLEManufacturerData::id attribute exists, has type string and can be modified\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEManufacturerData:id A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ manufacturerData, device = null;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ manufacturerData = device.manufacturerData;\r
+ if (manufacturerData != null) {\r
+ check_attribute(manufacturerData, "id", manufacturerData.id, "string", manufacturerData.id + "new");\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEScanCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_notexist
-//==== LABEL Check if interface BluetoothLEScanCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:BluetoothLEScanCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
- check_no_interface_object("BluetoothLEScanCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_notexist\r
+//==== LABEL Check if interface BluetoothLEScanCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:BluetoothLEScanCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_no_interface_object("BluetoothLEScanCallback");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEScanCallback_ondevicefound</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_ondevicefound
-//==== LABEL Check if BluetoothLEScanCallback ondevicefound is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:ondevicefound M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
- onconnected, onerror, characteristic, descriptor;
-
-t.step(function () {
- BbLEScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
-
- ondevicefound: t.step_func(function (foundDevice) {
- assert_type(foundDevice, "object", "foundDevice isn't an object");
- assert_type(foundDevice.address, "string", "address type check");
- assert_type(foundDevice.name, "string", "name type check");
- assert_type(foundDevice.txpowerLevel, "long", "txpowerLevel type check");
- assert_type(foundDevice.appearance, "long", "appearance type check");
- assert_type(foundDevice.uuids, "array", "uuids type check");
- assert_type(foundDevice.solicitationuuids, "array", "solicitationuuids type check");
- assert_type(foundDevice.serviceData, "object", "serviceData type check");
- assert_type(foundDevice.manufacturerData, "object", "manufacturerData type check");
- assert_not_equals(foundDevice.address, null, "address should not be null");
- assert_not_equals(foundDevice.name, null, "name should not be null");
- assert_not_equals(foundDevice.txpowerLevel, null, "txpowerLevel should not be null");
- assert_not_equals(foundDevice.appearance, null, "appearance should not be null");
- assert_not_equals(foundDevice.uuids[0], null, "uuids[0] should not be null");
- assert_not_equals(foundDevice.solicitationuuids[0], null, "solicitationuuidss[0] should not be null");
- assert_not_equals(foundDevice.serviceData, null, "serviceData should not be null");
- assert_not_equals(foundDevice.manufacturerData, null, "manufacturerData should not be null");
- adapter.stopScan();
- t.done();
- }),
-
- onfinished: t.step_func(function (devices) {
- })
- };
-
- BbLEScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_ondevicefound</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_ondevicefound\r
+//==== LABEL Check if BluetoothLEScanCallback ondevicefound is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:ondevicefound M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor;\r
+\r
+t.step(function () {\r
+ BbLEScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+\r
+ ondevicefound: t.step_func(function (foundDevice) {\r
+ assert_type(foundDevice, "object", "foundDevice isn't an object");\r
+ assert_type(foundDevice.address, "string", "address type check");\r
+ assert_type(foundDevice.name, "string", "name type check");\r
+ assert_type(foundDevice.txpowerLevel, "long", "txpowerLevel type check");\r
+ assert_type(foundDevice.appearance, "long", "appearance type check");\r
+ assert_type(foundDevice.uuids, "array", "uuids type check");\r
+ assert_type(foundDevice.solicitationuuids, "array", "solicitationuuids type check");\r
+ assert_type(foundDevice.serviceData, "object", "serviceData type check");\r
+ assert_type(foundDevice.manufacturerData, "object", "manufacturerData type check");\r
+ assert_not_equals(foundDevice.address, null, "address should not be null");\r
+ assert_not_equals(foundDevice.name, null, "name should not be null");\r
+ assert_not_equals(foundDevice.txpowerLevel, null, "txpowerLevel should not be null");\r
+ assert_not_equals(foundDevice.appearance, null, "appearance should not be null");\r
+ assert_not_equals(foundDevice.uuids[0], null, "uuids[0] should not be null");\r
+ assert_not_equals(foundDevice.solicitationuuids[0], null, "solicitationuuidss[0] should not be null");\r
+ assert_not_equals(foundDevice.serviceData, null, "serviceData should not be null");\r
+ assert_not_equals(foundDevice.manufacturerData, null, "manufacturerData should not be null");\r
+ adapter.stopScan();\r
+ t.done();\r
+ }),\r
+ \r
+ onfinished: t.step_func(function (devices) {\r
+ })\r
+ };\r
+\r
+ BbLEScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEScanCallback_onfinished</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_onfinished
-//==== LABEL Check if BluetoothLEScanCallback onfinished is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onfinished M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,
- onconnected, onerror, characteristic, descriptor;
-
-t.step(function () {
- BbLEScanSuccessCallback = {
- onstarted: t.step_func(function () {
- }),
-
- ondevicefound: t.step_func(function (foundDevice) {
- }),
-
- onfinished: t.step_func(function (devices) {
- assert_type(devices[0], "object", "devices[0] isn't an object");
- assert_type(devices[0].address, "string", "address type check");
- assert_type(devices[0].name, "string", "name type check");
- assert_type(devices[0].txpowerLevel, "long", "txpowerLevel type check");
- assert_type(devices[0].appearance, "long", "appearance type check");
- assert_type(devices[0].uuids, "array", "uuids type check");
- assert_type(devices[0].solicitationuuids, "array", "solicitationuuids type check");
- assert_type(devices[0].serviceData, "object", "serviceData type check");
- assert_type(devices[0].manufacturerData, "object", "manufacturerData type check");
- assert_not_equals(devices[0].address, null, "address should not be null");
- assert_not_equals(devices[0].name, null, "name should not be null");
- assert_not_equals(devices[0].txpowerLevel, null, "txpowerLevel should not be null");
- assert_not_equals(devices[0].appearance, null, "appearance should not be null");
- assert_not_equals(devices[0].uuids[0], null, "uuids[0] should not be null");
- assert_not_equals(devices[0].solicitationuuids[0], null, "solicitationuuidss[0] should not be null");
- assert_not_equals(devices[0].serviceData, null, "serviceData should not be null");
- assert_not_equals(devices[0].manufacturerData, null, "manufacturerData should not be null");
- t.done();
- })
- };
-
- BbLEScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_onfinished</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_onfinished\r
+//==== LABEL Check if BluetoothLEScanCallback onfinished is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onfinished M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, BbLEScanSuccessCallback, BbLEScanRrrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor;\r
+\r
+t.step(function () {\r
+ BbLEScanSuccessCallback = {\r
+ onstarted: t.step_func(function () {\r
+ }),\r
+\r
+ ondevicefound: t.step_func(function (foundDevice) {\r
+ }),\r
+ \r
+ onfinished: t.step_func(function (devices) {\r
+ assert_type(devices[0], "object", "devices[0] isn't an object");\r
+ assert_type(devices[0].address, "string", "address type check");\r
+ assert_type(devices[0].name, "string", "name type check");\r
+ assert_type(devices[0].txpowerLevel, "long", "txpowerLevel type check");\r
+ assert_type(devices[0].appearance, "long", "appearance type check");\r
+ assert_type(devices[0].uuids, "array", "uuids type check");\r
+ assert_type(devices[0].solicitationuuids, "array", "solicitationuuids type check");\r
+ assert_type(devices[0].serviceData, "object", "serviceData type check");\r
+ assert_type(devices[0].manufacturerData, "object", "manufacturerData type check");\r
+ assert_not_equals(devices[0].address, null, "address should not be null");\r
+ assert_not_equals(devices[0].name, null, "name should not be null");\r
+ assert_not_equals(devices[0].txpowerLevel, null, "txpowerLevel should not be null");\r
+ assert_not_equals(devices[0].appearance, null, "appearance should not be null");\r
+ assert_not_equals(devices[0].uuids[0], null, "uuids[0] should not be null");\r
+ assert_not_equals(devices[0].solicitationuuids[0], null, "solicitationuuidss[0] should not be null");\r
+ assert_not_equals(devices[0].serviceData, null, "serviceData should not be null");\r
+ assert_not_equals(devices[0].manufacturerData, null, "manufacturerData should not be null");\r
+ t.done();\r
+ })\r
+ };\r
+\r
+ BbLEScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.startScan(BbLEScanSuccessCallback, BbLEScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>BluetoothLEScanCallback_onsuccess</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEScanCallback_onsuccess
-//==== LABEL Check if BluetoothLEScanCallback onsuccess is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (foundDevice) {
- assert_type(foundDevice, "object", "foundDevice isn't an object");
- assert_type(foundDevice.address, "string", "address type check");
- assert_type(foundDevice.name, "string", "name type check");
- assert_not_equals(foundDevice.address, null, "address should not be null");
- adapter.stopScan();
- t.done();
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothLEScanCallback_onsuccess</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEScanCallback_onsuccess\r
+//==== LABEL Check if BluetoothLEScanCallback onsuccess is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:BluetoothLEScanCallback:onsuccess M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (foundDevice) {\r
+ assert_type(foundDevice, "object", "foundDevice isn't an object");\r
+ assert_type(foundDevice.address, "string", "address type check");\r
+ assert_type(foundDevice.name, "string", "name type check");\r
+ assert_not_equals(foundDevice.address, null, "address should not be null");\r
+ adapter.stopScan();\r
+ t.done();\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEServiceData_data_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEServiceData_data_attribute
-//==== LABEL Check if BluetoothLEServiceData::data attribute exists, has type string and can be modified
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- serviceData, device = null;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- serviceData = device.serviceData;
- if (serviceData != null) {
- check_attribute(serviceData, "data", serviceData.data, "string", serviceData.data + "new");
- t.done();
- } else {
- t.done();
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEServiceData_data_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEServiceData_data_attribute\r
+//==== LABEL Check if BluetoothLEServiceData::data attribute exists, has type string and can be modified\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:data A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ serviceData, device = null;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ serviceData = device.serviceData;\r
+ if (serviceData != null) {\r
+ check_attribute(serviceData, "data", serviceData.data, "string", serviceData.data + "new");\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEServiceData_extend</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEServiceData_extend
-//==== LABEL Check if BluetoothLEServiceData is extendable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA OBX
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- serviceData, device = null;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- serviceData = device.serviceData;
- if (serviceData != null) {
- check_extensibility(serviceData);
- t.done();
- } else {
- t.done();
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEServiceData_extend</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEServiceData_extend\r
+//==== LABEL Check if BluetoothLEServiceData is extendable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:BluetoothLEServiceData U\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA OBX\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ serviceData, device = null;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ serviceData = device.serviceData;\r
+ if (serviceData != null) {\r
+ check_extensibility(serviceData);\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Qunfang Lin <qunfang.lin@samsung.com>
-
--->
-
-<html>
-<head>
-<title>BluetoothLEServiceData_uuid_attribute</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothLEServiceData_uuid_attribute
-//==== LABEL Check if BluetoothLEServiceData::uuid attribute exists, has type string, can be modified and is nullable
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A
-//==== SPEC_URL TBD
-//==== EXECUTION_TYPE manual
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA AE AT ASG AN
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,
- serviceData, device = null;
-
-t.step(function () {
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- device = bledevice;
- adapter.stopScan();
- serviceData = device.serviceData;
- if (serviceData != null) {
- check_attribute(serviceData, "uuid", serviceData.uuid, "string", serviceData.uuid + "new");
- check_not_nullable(serviceData, "uuid");
- t.done();
- } else {
- t.done();
- }
- }
- });
-
- bleScanRrrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Qunfang Lin <qunfang.lin@samsung.com>\r
+\r
+-->\r
+\r
+<html>\r
+<head>\r
+<title>BluetoothLEServiceData_uuid_attribute</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothLEServiceData_uuid_attribute\r
+//==== LABEL Check if BluetoothLEServiceData::uuid attribute exists, has type string, can be modified and is nullable\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothLEServiceData:uuid A\r
+//==== SPEC_URL TBD\r
+//==== EXECUTION_TYPE manual\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA AE AT ASG AN\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanRrrorCallback,\r
+ serviceData, device = null;\r
+\r
+t.step(function () {\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ device = bledevice;\r
+ adapter.stopScan();\r
+ serviceData = device.serviceData;\r
+ if (serviceData != null) {\r
+ check_attribute(serviceData, "uuid", serviceData.uuid, "string", serviceData.uuid + "new");\r
+ check_not_nullable(serviceData, "uuid");\r
+ t.done();\r
+ } else {\r
+ t.done();\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanRrrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanRrrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBME
test(function () {
- var bt = tizen.bluetooth;
- check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var bt = tizen.bluetooth;
+check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
+ }
+ }, document.title);
</script>
</body>
Authors:
- Witold Choinkowski <w.choinkowsk@samsung.com>
+Witold Choinkowski <w.choinkowsk@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothManagerObject");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothManagerObject");
+ }
}, document.title);
</script>
Authors:
- Feng Zhao <feng.zhao@samsung.com>
+Feng Zhao <feng.zhao@samsung.com>
-->
<html>
//==== TEST_CRITERIA CONSTE CONSTT CONSTV CONSTRO
test(function () {
- check_const(tizen.bluetooth, 'BASE_UUID', "00000000-0000-1000-8000-00805F9B34FB", "string", 'SRC-NANJING');
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_const(tizen.bluetooth, 'BASE_UUID', "00000000-0000-1000-8000-00805F9B34FB", "string", 'SRC-NANJING');
+ }
}, document.title);
</script>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA AE AT ARO
test(function () {
- var major = tizen.bluetooth.deviceMajor;
- check_readonly(tizen.bluetooth, "deviceMajor", major, "object", "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var major = tizen.bluetooth.deviceMajor;
+check_readonly(tizen.bluetooth, "deviceMajor", major, "object", "Tizen");
+ }
+ }, document.title);
</script>
</body>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA AE AT ARO
test(function () {
- var minor = tizen.bluetooth.deviceMinor;
- check_readonly(tizen.bluetooth, "deviceMinor", minor, "object", "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var minor = tizen.bluetooth.deviceMinor;
+check_readonly(tizen.bluetooth, "deviceMinor", minor, "object", "Tizen");
+ }
+ }, document.title);
</script>
</body>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA AE AT ARO
test(function () {
- var devService = tizen.bluetooth.deviceService;
- check_readonly(tizen.bluetooth, "deviceService", devService, "object", "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var devService = tizen.bluetooth.deviceService;
+check_readonly(tizen.bluetooth, "deviceService", devService, "object", "Tizen");
+ }
+ }, document.title);
</script>
</body>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBX
test(function () {
- check_extensibility(tizen.bluetooth);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_extensibility(tizen.bluetooth);
+ }
}, document.title);
</script>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MNA MR
test(function () {
- var adapter = tizen.bluetooth.getDefaultAdapter();
- assert_type(adapter, "object", "adapter test");
- assert_type(adapter.powered, "boolean", "powered attribute test");
- assert_type(adapter.visible, "boolean", "visible attribute test");
- assert_type(adapter.address, "string", "address attribute test");
- assert_type(adapter.name, "string", "name attribute test");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var adapter = tizen.bluetooth.getDefaultAdapter();
+ assert_type(adapter, "object", "adapter test");
+ assert_type(adapter.powered, "boolean", "powered attribute test");
+ assert_type(adapter.visible, "boolean", "visible attribute test");
+ assert_type(adapter.address, "string", "address attribute test");
+ assert_type(adapter.name, "string", "name attribute test");
+ }
}, document.title);
</script>
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA ME
test(function () {
- assert_true("getDefaultAdapter" in tizen.bluetooth, "Method getDefaultAdapter does not exist in bluetooth adapter.");
- check_method_exists(tizen.bluetooth, "getDefaultAdapter");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+assert_true("getDefaultAdapter" in tizen.bluetooth, "Method getDefaultAdapter does not exist in bluetooth adapter.");
+check_method_exists(tizen.bluetooth, "getDefaultAdapter");
+ }
+ }, document.title);
</script>
</body>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA MNAEX
test(function () {
- checkExtraArgument(tizen.bluetooth, "getDefaultAdapter");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ checkExtraArgument(tizen.bluetooth, "getDefaultAdapter");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothManager_getLEAdapter</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothManager_getLEAdapter
-//==== LABEL Proper invocation of getLEAdapter method without arguments
-//==== PRIORITY P1
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNA MR
-
-test(function () {
- var adapter = tizen.bluetooth.getLEAdapter();
- assert_type(adapter, "object", "adapter test");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothManager_getLEAdapter</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothManager_getLEAdapter\r
+//==== LABEL Proper invocation of getLEAdapter method without arguments\r
+//==== PRIORITY P1\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNA MR\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ var adapter = tizen.bluetooth.getLEAdapter();\r
+ assert_type(adapter, "object", "adapter test");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothManager_getLEAdapter_exist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothManager_getLEAdapter_exist
-//==== LABEL Check if getLEAdapter method exists
-//==== PRIORITY P0
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-
-test(function () {
- check_method_exists(tizen.bluetooth, "getLEAdapter");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothManager_getLEAdapter_exist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothManager_getLEAdapter_exist\r
+//==== LABEL Check if getLEAdapter method exists\r
+//==== PRIORITY P0\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_method_exists(tizen.bluetooth, "getLEAdapter");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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:
- Lei Tang <lei312.tang@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothManager_getLEAdapter_extra_argument</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothManager_getLEAdapter_extra_argument
-//==== LABEL Check if method getLEAdapter of BluetoothManager accepts extra argument
-//==== PRIORITY P3
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MNAEX
-
-test(function () {
- checkExtraArgument(tizen.bluetooth, "getLEAdapter");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Lei Tang <lei312.tang@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothManager_getLEAdapter_extra_argument</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothManager_getLEAdapter_extra_argument\r
+//==== LABEL Check if method getLEAdapter of BluetoothManager accepts extra argument\r
+//==== PRIORITY P3\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothManager:getLEAdapter M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MNAEX\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ checkExtraArgument(tizen.bluetooth, "getLEAdapter");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
+Lei, ZhanX <zhanx.lei@intel.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA OBME
test(function () {
- var bt = tizen.bluetooth;
- assert_true("bluetooth" in tizen, "No bluetooth in tizen");
- check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
-}, document.title);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+var bt = tizen.bluetooth;
+assert_true("bluetooth" in tizen, "No bluetooth in tizen");
+check_readonly(tizen, "bluetooth", bt, "object", "Tizen");
+ }
+ }, document.title);
</script>
</body>
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothManager");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothManager");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MR
test(function () {
- var dataInt8Array = new Int8Array([-21, 31]);
- var dataUint8Array = new Uint8Array([240, 129]);
- var dataString = "0x18b1";
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var dataInt8Array = new Int8Array([-21, 31]);
+ var dataUint8Array = new Uint8Array([240, 129]);
+ var dataString = "0x18b1";
- var ary = tizen.bluetooth.toByteArray(dataInt8Array);
- var ary2 = tizen.bluetooth.toByteArray(dataUint8Array);
- var ary3 = tizen.bluetooth.toByteArray(dataString);
+ var ary = tizen.bluetooth.toByteArray(dataInt8Array);
+ var ary2 = tizen.bluetooth.toByteArray(dataUint8Array);
+ var ary3 = tizen.bluetooth.toByteArray(dataString);
- assert_type(ary, "array", "dataInt8Array toByteArray type test");
- assert_array_equals(ary, Uint8Array.from(dataInt8Array), "toByteArray [dataInt8Array] output equals test");
- assert_type(ary2, "array", "dataUint8Array toByteArray type test");
- assert_array_equals(ary2, Uint8Array.from(dataUint8Array), "toByteArray [dataUint8Array] output equals test");
- assert_type(ary3, "array", "dataString toByteArray type test");
+ assert_type(ary, "array", "dataInt8Array toByteArray type test");
+ assert_array_equals(ary, Uint8Array.from(dataInt8Array), "toByteArray [dataInt8Array] output equals test");
+ assert_type(ary2, "array", "dataUint8Array toByteArray type test");
+ assert_array_equals(ary2, Uint8Array.from(dataUint8Array), "toByteArray [dataUint8Array] output equals test");
+ assert_type(ary3, "array", "dataString toByteArray type test");
- const conver = str => {
- var res = [];
- for(var i=2; i<str.length; i+=2) {
- res.push(parseInt(str.substr(i, 2), 16));
+ const conver = str => {
+ var res = [];
+ for (var i = 2; i < str.length; i += 2) {
+ res.push(parseInt(str.substr(i, 2), 16));
+ }
+ return res
}
- return res
+ var uint3 = new Uint8Array(conver("0x18b1")); // "0x18b1"
+ assert_array_equals(ary3, Uint8Array.from(uint3), "toByteArray [dataString] output equals test");
}
- var uint3 = new Uint8Array(conver("0x18b1")); // "0x18b1"
- assert_array_equals(ary3, Uint8Array.from(uint3), "toByteArray [dataString] output equals test");
}, document.title);
</script>
//==== TEST_CRITERIA ME
test(function () {
- check_method_exists(tizen.bluetooth, "toByteArray");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_method_exists(tizen.bluetooth, "toByteArray");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- tizen.bluetooth.toByteArray();
- }, "Method with missing non-optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ assert_throws({ name: "TypeMismatchError" },
+ function () {
+ tizen.bluetooth.toByteArray();
+ }, "Method with missing non-optional argument.");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MR
test(function () {
- var dataInt8Array = new Int8Array([-21, 31]);
- var str = tizen.bluetooth.toDOMString(dataInt8Array);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var dataInt8Array = new Int8Array([-21, 31]);
+ var str = tizen.bluetooth.toDOMString(dataInt8Array);
- assert_type(str, "string", "toDOMString test");
- assert_equals(str, "0xeb1f", "toDOMString output equals test");
+ assert_type(str, "string", "toDOMString test");
+ assert_equals(str, "0xeb1f", "toDOMString output equals test");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA ME
test(function () {
- check_method_exists(tizen.bluetooth, "toDOMString");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_method_exists(tizen.bluetooth, "toDOMString");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- tizen.bluetooth.toDOMString();
- }, "Method with missing non-optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ assert_throws({ name: "TypeMismatchError" },
+ function () {
+ tizen.bluetooth.toDOMString();
+ }, "Method with missing non-optional argument.");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MR
test(function () {
- var dataInt8Array = new Int8Array([-21, 31]);
- var dataUint8Array = new Uint8Array([240, 129]);
- var dataString = "0x18b1";
- var byte = tizen.bluetooth.toUint8Array(dataInt8Array);
- var byte2 = tizen.bluetooth.toUint8Array(dataUint8Array);
- var byte3 = tizen.bluetooth.toUint8Array(dataString);
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var dataInt8Array = new Int8Array([-21, 31]);
+ var dataUint8Array = new Uint8Array([240, 129]);
+ var dataString = "0x18b1";
+ var byte = tizen.bluetooth.toUint8Array(dataInt8Array);
+ var byte2 = tizen.bluetooth.toUint8Array(dataUint8Array);
+ var byte3 = tizen.bluetooth.toUint8Array(dataString);
- assert_type(byte, "object", "toUint8Array test");
- assert_type(byte2, "object", "toUint8Array test");
- assert_type(byte3, "object", "toUint8Array test");
+ assert_type(byte, "object", "toUint8Array test");
+ assert_type(byte2, "object", "toUint8Array test");
+ assert_type(byte3, "object", "toUint8Array test");
- var uint1 = new Uint8Array([-21, 31]);
- var uint2 = new Uint8Array([240, 129]);
- const conver = str => {
- var res = [];
- for(var i=2; i<str.length; i+=2) {
- res.push(parseInt(str.substr(i, 2), 16));
+ var uint1 = new Uint8Array([-21, 31]);
+ var uint2 = new Uint8Array([240, 129]);
+ const conver = str => {
+ var res = [];
+ for (var i = 2; i < str.length; i += 2) {
+ res.push(parseInt(str.substr(i, 2), 16));
+ }
+ return res
}
- return res
- }
- var uint3 = new Uint8Array(conver("0x18b1"));
+ var uint3 = new Uint8Array(conver("0x18b1"));
- assert_array_equals(byte, uint1, "toUint8Array dataInt8Array output equals test");
- assert_array_equals(byte2, uint2, "toUint8Array dataUint8Array output equals test");
- assert_array_equals(byte3, uint3, "toUint8Array dataString output equals test");
+ assert_array_equals(byte, uint1, "toUint8Array dataInt8Array output equals test");
+ assert_array_equals(byte2, uint2, "toUint8Array dataUint8Array output equals test");
+ assert_array_equals(byte3, uint3, "toUint8Array dataString output equals test");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA ME
test(function () {
- check_method_exists(tizen.bluetooth, "toUint8Array");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_method_exists(tizen.bluetooth, "toUint8Array");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- tizen.bluetooth.toUint8Array();
- }, "Method with missing non-optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ assert_throws({ name: "TypeMismatchError" },
+ function () {
+ tizen.bluetooth.toUint8Array();
+ }, "Method with missing non-optional argument.");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MR
test(function () {
- var uuid = tizen.bluetooth.uuidTo128bit("1234");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var uuid = tizen.bluetooth.uuidTo128bit("1234");
- assert_type(uuid, "string", "uuidTo128bit test");
- assert_equals(uuid, "00001234-0000-1000-8000-00805f9b34fb", "uuidTo128bit output equals test");
+ assert_type(uuid, "string", "uuidTo128bit test");
+ assert_equals(uuid, "00001234-0000-1000-8000-00805f9b34fb", "uuidTo128bit output equals test");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA ME
test(function () {
- check_method_exists(tizen.bluetooth, "uuidTo128bit");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_method_exists(tizen.bluetooth, "uuidTo128bit");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws ({name:"InvalidValuesError"},
- function () {
- tizen.bluetooth.uuidTo128bit(123);
- }, "Method with missing non-optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ assert_throws({ name: "InvalidValuesError" },
+ function () {
+ tizen.bluetooth.uuidTo128bit(123);
+ }, "Method with missing non-optional argument.");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MR
test(function () {
- var uuid = tizen.bluetooth.uuidToShortestPossible("1234");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var uuid = tizen.bluetooth.uuidToShortestPossible("1234");
- assert_type(uuid, "string", "uuid test");
- assert_equals(uuid, "1234", "uuidToShortestPossible output equals test");
+ assert_type(uuid, "string", "uuid test");
+ assert_equals(uuid, "1234", "uuidToShortestPossible output equals test");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA ME
test(function () {
- check_method_exists(tizen.bluetooth, "uuidToShortestPossible");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_method_exists(tizen.bluetooth, "uuidToShortestPossible");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws ({name:"InvalidValuesError"},
- function () {
- tizen.bluetooth.uuidToShortestPossible(123);
- }, "Method with missing non-optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ assert_throws({ name: "InvalidValuesError" },
+ function () {
+ tizen.bluetooth.uuidToShortestPossible(123);
+ }, "Method with missing non-optional argument.");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MR
test(function () {
- var equal = tizen.bluetooth.uuidsEqual("abcdef01-2345-6789-abcd-ef0123456789", "abcdef01");
- var equal2 = tizen.bluetooth.uuidsEqual("ab5690ef", "ab5690ef-0000-1000-8000-00805F9B34FB");
-
- assert_type(equal, "boolean", "uuidsEqual test");
- assert_equals(equal, false, "uuidsEqual output false test");
- assert_equals(equal2, true, "uuidsEqual output true test");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ var equal = tizen.bluetooth.uuidsEqual("abcdef01-2345-6789-abcd-ef0123456789", "abcdef01");
+ var equal2 = tizen.bluetooth.uuidsEqual("ab5690ef", "ab5690ef-0000-1000-8000-00805F9B34FB");
+
+ assert_type(equal, "boolean", "uuidsEqual test");
+ assert_equals(equal, false, "uuidsEqual output false test");
+ assert_equals(equal2, true, "uuidsEqual output true test");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA ME
test(function () {
- check_method_exists(tizen.bluetooth, "uuidsEqual");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_method_exists(tizen.bluetooth, "uuidsEqual");
+ }
}, document.title);
</script>
//==== TEST_CRITERIA MMA
test(function () {
- assert_throws ({name:"InvalidValuesError"},
- function () {
- tizen.bluetooth.uuidsEqual();
- }, "Method with missing non-optional argument.");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ assert_throws({ name: "InvalidValuesError" },
+ function () {
+ tizen.bluetooth.uuidsEqual();
+ }, "Method with missing non-optional argument.");
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_extend</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_extend
-//==== LABEL Test whether the object can have new properties added for BluetoothServiceHandler
-//==== PRIORITY P3
-//==== ONLOAD_DELAY 180
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:BluetoothServiceHandler U
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA OBX
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess,
- registerRFCOMMServiceByUUIDError, registerRFCOMMServiceByUUIDSuccess;
-t.step(function () {
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- check_extensibility(handler);
-
- t.done();
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_extend</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_extend\r
+//==== LABEL Test whether the object can have new properties added for BluetoothServiceHandler\r
+//==== PRIORITY P3\r
+//==== ONLOAD_DELAY 180\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:BluetoothServiceHandler U\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA OBX\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), powerOnSuccess,\r
+ registerRFCOMMServiceByUUIDError, registerRFCOMMServiceByUUIDSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ check_extensibility(handler);\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_isConnected_attribute</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_isConnected_attribute
-//==== LABEL Check attribute isConnected in BluetoothServiceHandler
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:isConnected A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,
- chatServiceErrorCallback, isConnected;
-
-t.step(function () {
-
- chatServiceSuccessCallback = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- isConnected = handler.isConnected;
- check_readonly(handler, "isConnected", isConnected, "boolean", !(isConnected));
-
- t.done();
- });
-
- chatServiceErrorCallback = t.step_func(function (e) {
- assert_unreached("chatServiceErrorCallback exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_isConnected_attribute</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_isConnected_attribute\r
+//==== LABEL Check attribute isConnected in BluetoothServiceHandler\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:isConnected A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,\r
+ chatServiceErrorCallback, isConnected;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ chatServiceSuccessCallback = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ isConnected = handler.isConnected;\r
+ check_readonly(handler, "isConnected", isConnected, "boolean", !(isConnected));\r
+\r
+ t.done();\r
+ });\r
+\r
+ chatServiceErrorCallback = t.step_func(function (e) {\r
+ assert_unreached("chatServiceErrorCallback exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_name_attribute</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_name_attribute
-//==== LABEL Check attribute name in BluetoothServiceHandler
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:name A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,
- chatServiceErrorCallback, handlerName;
-
-t.step(function () {
-
- chatServiceSuccessCallback = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- handlerName = handler.name;
- check_readonly(handler, "name", handlerName, "string", name+"1234");
-
- t.done();
- });
-
- chatServiceErrorCallback = t.step_func(function (e) {
- assert_unreached("chatServiceErrorCallback exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_name_attribute</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_name_attribute\r
+//==== LABEL Check attribute name in BluetoothServiceHandler\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:name A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,\r
+ chatServiceErrorCallback, handlerName;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ chatServiceSuccessCallback = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ handlerName = handler.name;\r
+ check_readonly(handler, "name", handlerName, "string", name + "1234");\r
+\r
+ t.done();\r
+ });\r
+\r
+ chatServiceErrorCallback = t.step_func(function (e) {\r
+ assert_unreached("chatServiceErrorCallback exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothServiceHandler");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothServiceHandler");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
--->
-<html>
-
-<head>
-<title>BluetoothServiceHandler_onconnect_attribute</title>
-<meta charset="utf-8">
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-
-<body>
-<div id="log"></div>
-<ul id="testdetails" style="display:none;">
- <li>1. Push "Search" button on the remote device.</li>
- <li>2. Select this device among found devices after discovering is finished.</li>
- <li>3. Push "Connect to service" button on the remote device.</li>
-</ul>
-
-<script>
-
-//==== TEST: BluetoothServiceHandler_onconnect_attribute
-//==== LABEL Check whether a service record is registered in the device service record database properly (part 2)
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== STEP Push [Search] button on the remote device after description is appeared..
-//==== EXPECT The test device is found by the remote device.
-//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.
-//==== EXPECT onconnect is called.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:onconnect A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. tct-bt-helper MUST be launched on the remote device and turn on.
-//==== TEST_CRITERIA ASG AE AT ADV
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, onError, testMessage, registerSuccessCallback,
- sendMsg, serviceHandler, data, recvmsg, checkmsg, i, expectedMsgFromClient, sendMsgData, msgToClient;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onError = t.step_func(function (e) {
- assert_unreached("errorCallback arrived:" + e.message);
- });
- testMessage = "registerRFCOMMServiceByUUID";
-
- registerSuccessCallback = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- sendMsg = "";
-
- serviceHandler = handler;
- assert_type(handler.unregister, "function", "unRegister function type check");
- assert_type(handler.uuid, "string", "uuid attribute type check");
- assert_type(handler.name, "string", "name attribute type check");
- assert_type(handler.isConnected, "boolean", "isConnected attribute type check");
- assert_true(serviceHandler.isConnected === false, "isConnected attribute value check");
-
- assert_own_property(handler, "onconnect", "BluetoothServiceHandler does not own onconnect property");
- assert_equals(handler.onconnect, null, "onconnect in BluetoothServiceHandler has wrong value");
- serviceHandler.onconnect = function (socket) {
- assert_true(serviceHandler.isConnected === true, "isConnected attribute value check");
- assert_type(socket.uuid, "string", "socket uuid attribute type check");
- assert_type(socket.state, "string", "socket state attribute type check");
- assert_type(socket.peer, "object", "socket peer attribute type check");
- assert_type(socket.writeData, "function", "socket writeData function type check");
- assert_type(socket.readData, "function", "socket readData function type check");
- assert_type(socket.close, "function", "socket close function type check");
-
- socket.onmessage = function () {
- data = socket.readData();
- recvmsg = "";
-
- for (i = 0; i < data.length; i++) {
- recvmsg += String.fromCharCode(data[i]);
- }
-
- checkmsg = expectedMsgFromClient;
- assert_equals(recvmsg, checkmsg, "Data is not same");
- sendMsgData(msgToClient);
- };
-
- t.done();
- };
- assert_type(handler.onconnect, "function", "onconnect in BluetoothServiceHandler has wrong type after attaching function to it");
- document.getElementById("testdetails").style["display"] = "";
- });
- adapter = tizen.bluetooth.getDefaultAdapter();
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCallback, onError);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+-->\r
+<html>\r
+\r
+<head>\r
+<title>BluetoothServiceHandler_onconnect_attribute</title>\r
+<meta charset="utf-8">\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+\r
+<body>\r
+<div id="log"></div>\r
+<ul id="testdetails" style="display:none;">\r
+ <li>1. Push "Search" button on the remote device.</li>\r
+ <li>2. Select this device among found devices after discovering is finished.</li>\r
+ <li>3. Push "Connect to service" button on the remote device.</li>\r
+</ul>\r
+\r
+<script>\r
+\r
+//==== TEST: BluetoothServiceHandler_onconnect_attribute\r
+//==== LABEL Check whether a service record is registered in the device service record database properly (part 2)\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP Push [Search] button on the remote device after description is appeared..\r
+//==== EXPECT The test device is found by the remote device.\r
+//==== STEP Push [Connect to service] button on the remote device after selecting test device among found devices.\r
+//==== EXPECT onconnect is called.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:onconnect A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. tct-bt-helper MUST be launched on the remote device and turn on.\r
+//==== TEST_CRITERIA ASG AE AT ADV\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, onError, testMessage, registerSuccessCallback,\r
+ sendMsg, serviceHandler, data, recvmsg, checkmsg, i, expectedMsgFromClient, sendMsgData, msgToClient;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onError = t.step_func(function (e) {\r
+ assert_unreached("errorCallback arrived:" + e.message);\r
+ });\r
+ testMessage = "registerRFCOMMServiceByUUID";\r
+\r
+ registerSuccessCallback = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ sendMsg = "";\r
+\r
+ serviceHandler = handler;\r
+ assert_type(handler.unregister, "function", "unRegister function type check");\r
+ assert_type(handler.uuid, "string", "uuid attribute type check");\r
+ assert_type(handler.name, "string", "name attribute type check");\r
+ assert_type(handler.isConnected, "boolean", "isConnected attribute type check");\r
+ assert_true(serviceHandler.isConnected === false, "isConnected attribute value check");\r
+\r
+ assert_own_property(handler, "onconnect", "BluetoothServiceHandler does not own onconnect property");\r
+ assert_equals(handler.onconnect, null, "onconnect in BluetoothServiceHandler has wrong value");\r
+ serviceHandler.onconnect = function (socket) {\r
+ assert_true(serviceHandler.isConnected === true, "isConnected attribute value check");\r
+ assert_type(socket.uuid, "string", "socket uuid attribute type check");\r
+ assert_type(socket.state, "string", "socket state attribute type check");\r
+ assert_type(socket.peer, "object", "socket peer attribute type check");\r
+ assert_type(socket.writeData, "function", "socket writeData function type check");\r
+ assert_type(socket.readData, "function", "socket readData function type check");\r
+ assert_type(socket.close, "function", "socket close function type check");\r
+\r
+ socket.onmessage = function () {\r
+ data = socket.readData();\r
+ recvmsg = "";\r
+\r
+ for (i = 0; i < data.length; i++) {\r
+ recvmsg += String.fromCharCode(data[i]);\r
+ }\r
+\r
+ checkmsg = expectedMsgFromClient;\r
+ assert_equals(recvmsg, checkmsg, "Data is not same");\r
+ sendMsgData(msgToClient);\r
+ };\r
+\r
+ t.done();\r
+ };\r
+ assert_type(handler.onconnect, "function", "onconnect in BluetoothServiceHandler has wrong type after attaching function to it");\r
+ document.getElementById("testdetails").style["display"] = "";\r
+ });\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCallback, onError);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head></title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister
-//==== LABEL Check with non-optional arguments unregister()
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,
- registerRFCOMMServiceByUUIDError, powerOnSuccess, retValue = null;
-t.step(function () {
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
- setBluetoothHandlerCleanup(recordHandler);
- retValue = recordHandler.unregister();
-
- assert_equals(retValue, undefined, "unregister returns wrong value");
- t.done();
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head></title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister\r
+//==== LABEL Check with non-optional arguments unregister()\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), registerRFCOMMServiceByUUIDSuccess,\r
+ registerRFCOMMServiceByUUIDError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+ setBluetoothHandlerCleanup(recordHandler);\r
+ retValue = recordHandler.unregister();\r
+\r
+ assert_equals(retValue, undefined, "unregister returns wrong value");\r
+ t.done();\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_errorCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_errorCallback_TypeMismatch
-//==== LABEL Check whether unregister() method of the BluetoothServiceHandler with invalid errorCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout: 180000, explicit_done:true});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- exceptionName, errorCallback, i,
- conversionTable, successCallback, registerSuccessCB, registerErrorCB, powerOnSuccess;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- successCallback = t.step_func(function () {
- assert_unreached("Method unregister shouldn't end successfully.");
- });
-
- registerSuccessCB = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- for(i = 0; i < conversionTable.length; i++) {
- errorCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- handler.unregister(successCallback, errorCallback);
- }, "Given incorrect errorCallback.");
- }
-
- t.done();
- });
-
- registerErrorCB = t.step_func(function (e) {
- assert_unreached("registerErrorCB exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_errorCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_errorCallback_TypeMismatch\r
+//==== LABEL Check whether unregister() method of the BluetoothServiceHandler with invalid errorCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ exceptionName, errorCallback, i,\r
+ conversionTable, successCallback, registerSuccessCB, registerErrorCB, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ successCallback = t.step_func(function () {\r
+ assert_unreached("Method unregister shouldn't end successfully.");\r
+ });\r
+\r
+ registerSuccessCB = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ errorCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ handler.unregister(successCallback, errorCallback);\r
+ }, "Given incorrect errorCallback.");\r
+ }\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerErrorCB = t.step_func(function (e) {\r
+ assert_unreached("registerErrorCB exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_errorCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_errorCallback_invalid_cb
-//==== LABEL Check unregister() argument errorCallback validation
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout: 180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,
- unregisterSuccess, registerSuccessCB, registerErrorCB, powerOnSuccess;
-t.step(function () {
-
- incorrectCallback = {
- onerror: t.step_func(function (error) {
- assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
- })
- };
-
- unregisterSuccess = t.step_func(function () {
- assert_unreached("Method unregister shouldn't end successfully.");
- });
-
- registerSuccessCB = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- assert_throws({name: exceptionName},
- function () {
- handler.unregister(unregisterSuccess, incorrectCallback);
- }, "Given incorrect errorCallback.");
-
- t.done();
- });
-
- registerErrorCB = t.step_func(function (e) {
- assert_unreached("registerErrorCB exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_errorCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_errorCallback_invalid_cb\r
+//==== LABEL Check unregister() argument errorCallback validation\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout: 180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,\r
+ unregisterSuccess, registerSuccessCB, registerErrorCB, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ incorrectCallback = {\r
+ onerror: t.step_func(function (error) {\r
+ assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);\r
+ })\r
+ };\r
+\r
+ unregisterSuccess = t.step_func(function () {\r
+ assert_unreached("Method unregister shouldn't end successfully.");\r
+ });\r
+\r
+ registerSuccessCB = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ handler.unregister(unregisterSuccess, incorrectCallback);\r
+ }, "Given incorrect errorCallback.");\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerErrorCB = t.step_func(function (e) {\r
+ assert_unreached("registerErrorCB exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_exist</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_exist
-//==== LABEL Check if unregister method exists
-//==== PRIORITY P0
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA ME
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- assert_true("unregister" in handler, "Method unregister does not exist in BluetoothServiceHandler.");
- check_method_exists(handler, "unregister");
-
- t.done();
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_exist</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_exist\r
+//==== LABEL Check if unregister method exists\r
+//==== PRIORITY P0\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA ME\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ assert_true("unregister" in handler, "Method unregister does not exist in BluetoothServiceHandler.");\r
+ check_method_exists(handler, "unregister");\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_successCallback_TypeMismatch</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_successCallback_TypeMismatch
-//==== LABEL Check whether unregister() method called with invalid successCallback argument throws an exception
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MC
-setup({timeout:180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), exceptionName, i,
- adapter = null, conversionTable, errorCallback, registerSuccessCB, registerErrorCB, powerOnSuccess, successCallback;
-t.step(function () {
- conversionTable = getTypeConversionExceptions("functionObject", true);
-
- errorCallback = t.step_func(function (e) {
- assert_unreached("errorCallback exception:" + e.message);
- });
-
- registerSuccessCB = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- for(i = 0; i < conversionTable.length; i++) {
- successCallback = conversionTable[i][0];
- exceptionName = conversionTable[i][1];
-
- assert_throws({name: exceptionName},
- function () {
- handler.unregister(successCallback, errorCallback);
- }, "Given incorrect successCallback.");
- }
-
- t.done();
- });
-
- registerErrorCB = t.step_func(function (e) {
- assert_unreached("registerErrorCB exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_successCallback_TypeMismatch</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_successCallback_TypeMismatch\r
+//==== LABEL Check whether unregister() method called with invalid successCallback argument throws an exception\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MC\r
+setup({timeout:180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), exceptionName, i,\r
+ adapter = null, conversionTable, errorCallback, registerSuccessCB, registerErrorCB, powerOnSuccess, successCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ conversionTable = getTypeConversionExceptions("functionObject", true);\r
+\r
+ errorCallback = t.step_func(function (e) {\r
+ assert_unreached("errorCallback exception:" + e.message);\r
+ });\r
+\r
+ registerSuccessCB = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ for (i = 0; i < conversionTable.length; i++) {\r
+ successCallback = conversionTable[i][0];\r
+ exceptionName = conversionTable[i][1];\r
+\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ handler.unregister(successCallback, errorCallback);\r
+ }, "Given incorrect successCallback.");\r
+ }\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerErrorCB = t.step_func(function (e) {\r
+ assert_unreached("registerErrorCB exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_successCallback_invalid_cb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_successCallback_invalid_cb
-//==== LABEL Check if successful callback of unregister() method invoked
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTCB
-setup({timeout:180000, explicit_done:true});
-
-var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,
- unregisterError, registerSuccessCB, registerErrorCB, powerOnSuccess;
-t.step(function () {
-
- incorrectCallback = {
- onsuccess: t.step_func(function () {
- assert_unreached("Method unregister shouldn't end successfully.");
- })
- };
-
- unregisterError = t.step_func(function (e) {
- assert_unreached("unregisterError exception:" + e.message);
- });
-
- registerSuccessCB = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- assert_throws({name: exceptionName},
- function () {
- handler.unregister(incorrectCallback, unregisterError);
- }, "Given incorrect successCallback.");
-
- t.done();
- });
-
- registerErrorCB = t.step_func(function (e) {
- assert_unreached("registerErrorCB exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_successCallback_invalid_cb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_successCallback_invalid_cb\r
+//==== LABEL Check if successful callback of unregister() method invoked\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTCB\r
+setup({timeout:180000, explicit_done:true});\r
+\r
+var t = async_test(document.title, {timeout: 180000}), adapter, exceptionName = "TypeMismatchError", incorrectCallback,\r
+ unregisterError, registerSuccessCB, registerErrorCB, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ incorrectCallback = {\r
+ onsuccess: t.step_func(function () {\r
+ assert_unreached("Method unregister shouldn't end successfully.");\r
+ })\r
+ };\r
+\r
+ unregisterError = t.step_func(function (e) {\r
+ assert_unreached("unregisterError exception:" + e.message);\r
+ });\r
+\r
+ registerSuccessCB = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ handler.unregister(incorrectCallback, unregisterError);\r
+ }, "Given incorrect successCallback.");\r
+\r
+ t.done();\r
+ });\r
+\r
+ registerErrorCB = t.step_func(function (e) {\r
+ assert_unreached("registerErrorCB exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_unregisterServiceRecord</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_unregisterServiceRecord
-//==== LABEL Check using unregister method which is in BluetoothServiceHandler interface to unregister service record
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,
- unregisterError, chatServiceSuccessCallback, powerOnSuccess, chatServiceErrorCallback;
-t.step(function () {
- unregisterSuccess = t.step_func(function () {
- t.done();
- });
-
- unregisterError = t.step_func(function (e) {
- assert_unreached("unregisterError, Exception: " + e.message);
- });
-
- chatServiceSuccessCallback = t.step_func(function (recordHandler) {
- recordHandler.unregister(unregisterSuccess, unregisterError);
- });
-
- chatServiceErrorCallback = t.step_func(function (e) {
- assert_unreached("chatServiceErrorCallback, Exception: " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, \r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list \r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice, \r
+ this list of conditions and the following disclaimer in the documentation \r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors \r
+ may be used to endorse or promote products derived from this work without \r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" \r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, \r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING \r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_unregisterServiceRecord</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_unregisterServiceRecord\r
+//==== LABEL Check using unregister method which is in BluetoothServiceHandler interface to unregister service record\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,\r
+ unregisterError, chatServiceSuccessCallback, powerOnSuccess, chatServiceErrorCallback;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+\r
+ unregisterSuccess = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ unregisterError = t.step_func(function (e) {\r
+ assert_unreached("unregisterError, Exception: " + e.message);\r
+ });\r
+\r
+ chatServiceSuccessCallback = t.step_func(function (recordHandler) {\r
+ recordHandler.unregister(unregisterSuccess, unregisterError);\r
+ });\r
+\r
+ chatServiceErrorCallback = t.step_func(function (e) {\r
+ assert_unreached("chatServiceErrorCallback, Exception: " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_with_errorCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_with_errorCallback
-//==== LABEL Check with optional arguments unregister(valid_successCallback, valid_errorCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,
- unregisterError, registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
- unregisterSuccess = t.step_func(function () {
- t.done();
- });
-
- unregisterError = t.step_func(function (e) {
- assert_unreached("unregisterError exception:" + e.message);
- });
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
- recordHandler.unregister(unregisterSuccess, unregisterError);
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_with_errorCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_with_errorCallback\r
+//==== LABEL Check with optional arguments unregister(valid_successCallback, valid_errorCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,\r
+ unregisterError, registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ unregisterSuccess = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ unregisterError = t.step_func(function (e) {\r
+ assert_unreached("unregisterError exception:" + e.message);\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+ recordHandler.unregister(unregisterSuccess, unregisterError);\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_unregister_with_successCallback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_unregister_with_successCallback
-//==== LABEL Check with optional arguments unregister(valid_successCallback)
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MOA
-setup({timeout: 180000});
-
-var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,
- registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;
-t.step(function () {
-
- unregisterSuccess = t.step_func(function () {
- t.done();
- });
-
- registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {
- recordHandler.unregister(unregisterSuccess);
- });
-
- registerRFCOMMServiceByUUIDError = t.step_func(function (e) {
- assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_unregister_with_successCallback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_unregister_with_successCallback\r
+//==== LABEL Check with optional arguments unregister(valid_successCallback)\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MOA\r
+setup({timeout: 180000});\r
+\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), unregisterSuccess,\r
+ registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ unregisterSuccess = t.step_func(function () {\r
+ t.done();\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDSuccess = t.step_func(function (recordHandler) {\r
+ recordHandler.unregister(unregisterSuccess);\r
+ });\r
+\r
+ registerRFCOMMServiceByUUIDError = t.step_func(function (e) {\r
+ assert_unreached("registerRFCOMMServiceByUUIDError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, registerRFCOMMServiceByUUIDError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceHandler_uuid_attribute</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceHandler_uuid_attribute
-//==== LABEL Check attribute uuid in BluetoothServiceHandler
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:uuid A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA AE AT ARO
-setup({timeout:180000, explicit_done:true});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,
- chatServiceErrorCallback, uuid;
-t.step(function () {
-
- chatServiceSuccessCallback = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- uuid = handler.uuid;
- check_readonly(handler, "uuid", uuid, "string", "1234");
-
- t.done();
- });
-
- chatServiceErrorCallback = t.step_func(function (e) {
- assert_unreached("chatServiceErrorCallback exception " + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceHandler_uuid_attribute</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceHandler_uuid_attribute\r
+//==== LABEL Check attribute uuid in BluetoothServiceHandler\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:uuid A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA AE AT ARO\r
+setup({timeout:180000, explicit_done:true});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, chatServiceSuccessCallback,\r
+ chatServiceErrorCallback, uuid;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ chatServiceSuccessCallback = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ uuid = handler.uuid;\r
+ check_readonly(handler, "uuid", uuid, "string", "1234");\r
+\r
+ t.done();\r
+ });\r
+\r
+ chatServiceErrorCallback = t.step_func(function (e) {\r
+ assert_unreached("chatServiceErrorCallback exception " + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCallback, chatServiceErrorCallback);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CBNIO
test(function () {
- check_no_interface_object("BluetoothServiceSuccessCallback");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothServiceSuccessCallback");
+ }
}, document.title);
</script>
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothServiceSuccessCallback_onsuccess</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothServiceSuccessCallback_onsuccess
-//==== LABEL Check if BluetoothServiceSuccessCallback callback is called and if its arguments have proper type
-//==== PRIORITY P1
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceSuccessCallback:onsuccess M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA CBT CBOA
-setup({timeout:180000, explicit_done:true});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- chatServiceSuccessCB, chatServiceErrorCB, powerOnSuccess;
-
-t.step(function () {
-
- chatServiceSuccessCB = t.step_func(function (handler) {
- setBluetoothHandlerCleanup(handler);
- assert_true("uuid" in handler, "No uuid in socket");
- assert_true("name" in handler, "No name in socket");
- assert_true("isConnected" in handler, "No isConnected in socket");
- assert_true("onconnect" in handler, "No onconnect in socket");
- assert_type(handler.unregister, "function", "Method unregister does not exist.");
-
- t.done();
- });
-
- chatServiceErrorCB = t.step_func(function (e) {
- assert_unreached("chatServiceErrorCB exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCB, chatServiceErrorCB);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothServiceSuccessCallback_onsuccess</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothServiceSuccessCallback_onsuccess\r
+//==== LABEL Check if BluetoothServiceSuccessCallback callback is called and if its arguments have proper type\r
+//==== PRIORITY P1\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceSuccessCallback:onsuccess M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA CBT CBOA\r
+setup({timeout:180000, explicit_done:true});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ chatServiceSuccessCB, chatServiceErrorCB, powerOnSuccess;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ chatServiceSuccessCB = t.step_func(function (handler) {\r
+ setBluetoothHandlerCleanup(handler);\r
+ assert_true("uuid" in handler, "No uuid in socket");\r
+ assert_true("name" in handler, "No name in socket");\r
+ assert_true("isConnected" in handler, "No isConnected in socket");\r
+ assert_true("onconnect" in handler, "No onconnect in socket");\r
+ assert_type(handler.unregister, "function", "Method unregister does not exist.");\r
+\r
+ t.done();\r
+ });\r
+\r
+ chatServiceErrorCB = t.step_func(function (e) {\r
+ assert_unreached("chatServiceErrorCB exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", chatServiceSuccessCB, chatServiceErrorCB);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Witold Choinkowski <w.choinkowsk@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket
-//==== LABEL Check BluetoothSocket attributes and functions
-//==== EXECUTION_TYPE manual
-//==== PRIORITY P3
-//==== STEP several tests executed from base test
-//==== EXPECT all subtests should be successful
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== TEST_CRITERIA MNAEX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:BluetoothSocket U
-//==== TEST_CRITERIA OBX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A
-//==== TEST_CRITERIA AE ADV
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A
-//==== TEST_CRITERIA AE ADV
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:peer A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M
-//==== TEST_CRITERIA MNAEX
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocketSuccessCallback:onsuccess M
-//==== TEST_CRITERIA CBT CBOA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:uuid A
-//==== TEST_CRITERIA AE AT ARO
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== TEST_CRITERIA ME
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== TEST_CRITERIA MMA
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== TEST_CRITERIA MC
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== TEST_CRITERIA MNA MNAST
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, onSocketConnect, onSocketError,
- gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess,
- peerCP, fakePeer, skState, skUuid, param, i;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- //BluetoothSocket_close_exist ME
- test(function () {
- assert_true("close" in socket, "close in onSocketConnect");
- check_method_exists(socket, "close");
- }, "BluetoothSocket_close_exist");
-
- //BluetoothSocket_extend OBX
- test(function () {
- check_extensibility(socket);
- }, "BluetoothSocket_extend");
-
- //BluetoothSocket_onclose_property_exists AE ADV
- test(function () {
- assert_true("onclose" in socket, "onclose in onSocketConnect");
- assert_equals(socket.onclose, null, "onclose in BluetoothSocket has wrong default value");
- }, "BluetoothSocket_onclose_property_exists");
-
- //BluetoothSocket_onmessage_property_exists AE ADV
- test(function () {
- assert_true("onmessage" in socket, "onmessage in onSocketConnect");
- assert_equals(socket.onmessage, null, "onmessage in BluetoothSocket has wrong default value");
- }, "BluetoothSocket_onmessage_property_exists");
-
- //BluetoothSocket_peer_attribute AE AT ARO
- test(function () {
- assert_own_property(socket, "peer", "socket does not own peer property.");
- assert_own_property(socket.peer, "name", "socket.peer does not own name property.");
- assert_own_property(socket.peer, "address", "socket.peer does not own address property.");
- assert_own_property(socket.peer, "deviceClass", "socket.peer does not own deviceClass property.");
- assert_own_property(socket.peer, "isBonded", "socket.peer does not own isBonded property.");
- assert_own_property(socket.peer, "isTrusted", "socket.peer does not own isTrusted property.");
- assert_own_property(socket.peer, "isConnected", "socket.peer does not own isConnected property.");
- assert_own_property(socket.peer, "uuids", "socket.peer does not own uuids property.");
-
- assert_type(socket.peer, "object", "Type of deviceClass is different.");
-
- //peer is obtained by getter so I can not directly test the override
- peerCP = socket.peer;
- fakePeer = {
- name:"fakeName",
- address:"00:02:18:2F:78:32",
- deviceClass:{},
- isBonded:true,
- isTrusted:true,
- isConnected:true,
- uuids:[],
-
- connectToServiceByUUID:function (){}
- };
- socket.peer = fakePeer;
- assert_equals(socket.peer.name, peerCP.name, "peer can be modified.");
- assert_equals(socket.peer.address, peerCP.address, "peer can be modified.");
- assert_equals(socket.peer.isBonded, peerCP.isBonded, "peer can be modified.");
- assert_equals(socket.peer.isTrusted, peerCP.isTrusted, "peer can be modified.");
- assert_equals(socket.peer.isConnected, peerCP.isConnected, "peer can be modified.");
- assert_array_equals(socket.peer.uuids, peerCP.uuids, "deviceClass can be modified.");
- }, "BluetoothSocket_peer_attribute");
-
- //BluetoothSocket_readData_exist ME
- test(function () {
- assert_true("readData" in socket, "readData in onSocketConnect");
- check_method_exists(socket, "readData");
- }, "BluetoothSocket_readData_exist");
-
- //BluetoothSocket_readData_extra_argument MNAEX
- test(function () {
- checkExtraArgument(socket, "readData");
- }, "BluetoothSocket_readData_extra_argument");
-
- //BluetoothSocket_state_attribute AE AT ARO
- test(function () {
- skState = socket.state;
- check_readonly(socket, "state", skState, "string", "1234");
- }, "BluetoothSocket_state_attribute");
-
- //BluetoothSocketSuccessCallback_onsuccess CBT CBOA
- test(function () {
- assert_true("uuid" in socket, "No uuid in socket");
- assert_true("state" in socket, "No state in socket");
- assert_true("peer" in socket, "No peer in socket");
- assert_true("onmessage" in socket, "No onmessage in socket");
- assert_true("onclose" in socket, "No onclose in socket");
- assert_type(socket.writeData, "function", "Method writeData does not exist.");
- assert_type(socket.readData, "function", "Method readData does not exist.");
- assert_type(socket.close, "function", "Method close does not exist.");
- }, "BluetoothSocketSuccessCallback_onsuccess");
-
- //BluetoothSocket_uuid_attribute AE AT ARO
- test(function () {
- skUuid = socket.uuid;
- check_readonly(socket, "uuid", skUuid, "string", "1234");
- }, "BluetoothSocket_uuid_attribute");
-
- //BluetoothSocket_writeData_exist ME
- test(function () {
- assert_true("writeData" in socket, "connectToServiceByUUID does not exist.");
- check_method_exists(socket, "writeData");
- }, "BluetoothSocket_writeData_exist");
-
- //BluetoothSocket_writeData_missarg MMA
- /*test(function () {
- assert_throws ({name:"TypeMismatchError"},
- function () {
- socket.writeData();
- }, "Method with non optional argument.");
- }, "BluetoothSocket_writeData_missarg");
-
- //BluetoothSocket_writeData_TypeMismatch MC
- test(function () {
- param = [1, "aaa", {}, function () {}, true];
- for (i = 0; i < param.length; i++) {
- assert_throws(TYPE_MISMATCH_EXCEPTION,
- function () {
- socket.writeData(param[i]);
- }, "Method type mismatch");
- }
- }, "BluetoothSocket_writeData_TypeMismatch");*/
-
- //BluetoothSocket_close_extra_argument MNAEX
- test(function () {
- checkExtraArgument(socket, "close");
- }, "BluetoothSocket_close_extra_argument");
-
- //BluetoothSocketState_close_enum MNA MNAST
- test(function () {
- socket.close();
- assert_equals(socket.state, "CLOSED", "BluetoothSocket.state enum is no equal to 'CLOSED'");
- }, "BluetoothSocketState_close_enum");
-
- t.done();
- });
-
- onSocketError = t.step_func(function (e) {
- assert_unreached("onSocketError exception:" + e.message);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Witold Choinkowski <w.choinkowsk@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket\r
+//==== LABEL Check BluetoothSocket attributes and functions\r
+//==== EXECUTION_TYPE manual\r
+//==== PRIORITY P3\r
+//==== STEP several tests executed from base test\r
+//==== EXPECT all subtests should be successful\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== TEST_CRITERIA MNAEX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:BluetoothSocket U\r
+//==== TEST_CRITERIA OBX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A\r
+//==== TEST_CRITERIA AE ADV\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A\r
+//==== TEST_CRITERIA AE ADV\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:peer A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M\r
+//==== TEST_CRITERIA MNAEX\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocketSuccessCallback:onsuccess M\r
+//==== TEST_CRITERIA CBT CBOA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:uuid A\r
+//==== TEST_CRITERIA AE AT ARO\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== TEST_CRITERIA ME\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== TEST_CRITERIA MMA\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== TEST_CRITERIA MC\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== TEST_CRITERIA MNA MNAST\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, onSocketConnect, onSocketError,\r
+ gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess,\r
+ peerCP, fakePeer, skState, skUuid, param, i;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ //BluetoothSocket_close_exist ME\r
+ test(function () {\r
+ assert_true("close" in socket, "close in onSocketConnect");\r
+ check_method_exists(socket, "close");\r
+ }, "BluetoothSocket_close_exist");\r
+\r
+ //BluetoothSocket_extend OBX\r
+ test(function () {\r
+ check_extensibility(socket);\r
+ }, "BluetoothSocket_extend");\r
+\r
+ //BluetoothSocket_onclose_property_exists AE ADV\r
+ test(function () {\r
+ assert_true("onclose" in socket, "onclose in onSocketConnect");\r
+ assert_equals(socket.onclose, null, "onclose in BluetoothSocket has wrong default value");\r
+ }, "BluetoothSocket_onclose_property_exists");\r
+\r
+ //BluetoothSocket_onmessage_property_exists AE ADV\r
+ test(function () {\r
+ assert_true("onmessage" in socket, "onmessage in onSocketConnect");\r
+ assert_equals(socket.onmessage, null, "onmessage in BluetoothSocket has wrong default value");\r
+ }, "BluetoothSocket_onmessage_property_exists");\r
+\r
+ //BluetoothSocket_peer_attribute AE AT ARO\r
+ test(function () {\r
+ assert_own_property(socket, "peer", "socket does not own peer property.");\r
+ assert_own_property(socket.peer, "name", "socket.peer does not own name property.");\r
+ assert_own_property(socket.peer, "address", "socket.peer does not own address property.");\r
+ assert_own_property(socket.peer, "deviceClass", "socket.peer does not own deviceClass property.");\r
+ assert_own_property(socket.peer, "isBonded", "socket.peer does not own isBonded property.");\r
+ assert_own_property(socket.peer, "isTrusted", "socket.peer does not own isTrusted property.");\r
+ assert_own_property(socket.peer, "isConnected", "socket.peer does not own isConnected property.");\r
+ assert_own_property(socket.peer, "uuids", "socket.peer does not own uuids property.");\r
+\r
+ assert_type(socket.peer, "object", "Type of deviceClass is different.");\r
+\r
+ //peer is obtained by getter so I can not directly test the override\r
+ peerCP = socket.peer;\r
+ fakePeer = {\r
+ name: "fakeName",\r
+ address: "00:02:18:2F:78:32",\r
+ deviceClass: {},\r
+ isBonded: true,\r
+ isTrusted: true,\r
+ isConnected: true,\r
+ uuids: [],\r
+\r
+ connectToServiceByUUID: function () { }\r
+ };\r
+ socket.peer = fakePeer;\r
+ assert_equals(socket.peer.name, peerCP.name, "peer can be modified.");\r
+ assert_equals(socket.peer.address, peerCP.address, "peer can be modified.");\r
+ assert_equals(socket.peer.isBonded, peerCP.isBonded, "peer can be modified.");\r
+ assert_equals(socket.peer.isTrusted, peerCP.isTrusted, "peer can be modified.");\r
+ assert_equals(socket.peer.isConnected, peerCP.isConnected, "peer can be modified.");\r
+ assert_array_equals(socket.peer.uuids, peerCP.uuids, "deviceClass can be modified.");\r
+ }, "BluetoothSocket_peer_attribute");\r
+\r
+ //BluetoothSocket_readData_exist ME\r
+ test(function () {\r
+ assert_true("readData" in socket, "readData in onSocketConnect");\r
+ check_method_exists(socket, "readData");\r
+ }, "BluetoothSocket_readData_exist");\r
+\r
+ //BluetoothSocket_readData_extra_argument MNAEX\r
+ test(function () {\r
+ checkExtraArgument(socket, "readData");\r
+ }, "BluetoothSocket_readData_extra_argument");\r
+\r
+ //BluetoothSocket_state_attribute AE AT ARO\r
+ test(function () {\r
+ skState = socket.state;\r
+ check_readonly(socket, "state", skState, "string", "1234");\r
+ }, "BluetoothSocket_state_attribute");\r
+\r
+ //BluetoothSocketSuccessCallback_onsuccess CBT CBOA\r
+ test(function () {\r
+ assert_true("uuid" in socket, "No uuid in socket");\r
+ assert_true("state" in socket, "No state in socket");\r
+ assert_true("peer" in socket, "No peer in socket");\r
+ assert_true("onmessage" in socket, "No onmessage in socket");\r
+ assert_true("onclose" in socket, "No onclose in socket");\r
+ assert_type(socket.writeData, "function", "Method writeData does not exist.");\r
+ assert_type(socket.readData, "function", "Method readData does not exist.");\r
+ assert_type(socket.close, "function", "Method close does not exist.");\r
+ }, "BluetoothSocketSuccessCallback_onsuccess");\r
+\r
+ //BluetoothSocket_uuid_attribute AE AT ARO\r
+ test(function () {\r
+ skUuid = socket.uuid;\r
+ check_readonly(socket, "uuid", skUuid, "string", "1234");\r
+ }, "BluetoothSocket_uuid_attribute");\r
+\r
+ //BluetoothSocket_writeData_exist ME\r
+ test(function () {\r
+ assert_true("writeData" in socket, "connectToServiceByUUID does not exist.");\r
+ check_method_exists(socket, "writeData");\r
+ }, "BluetoothSocket_writeData_exist");\r
+\r
+ //BluetoothSocket_writeData_missarg MMA\r
+ /*test(function () {\r
+ assert_throws ({name:"TypeMismatchError"},\r
+ function () {\r
+ socket.writeData();\r
+ }, "Method with non optional argument.");\r
+ }, "BluetoothSocket_writeData_missarg");\r
+ \r
+ //BluetoothSocket_writeData_TypeMismatch MC\r
+ test(function () {\r
+ param = [1, "aaa", {}, function () {}, true];\r
+ for (i = 0; i < param.length; i++) {\r
+ assert_throws(TYPE_MISMATCH_EXCEPTION,\r
+ function () {\r
+ socket.writeData(param[i]);\r
+ }, "Method type mismatch");\r
+ }\r
+ }, "BluetoothSocket_writeData_TypeMismatch");*/\r
+\r
+ //BluetoothSocket_close_extra_argument MNAEX\r
+ test(function () {\r
+ checkExtraArgument(socket, "close");\r
+ }, "BluetoothSocket_close_extra_argument");\r
+\r
+ //BluetoothSocketState_close_enum MNA MNAST\r
+ test(function () {\r
+ socket.close();\r
+ assert_equals(socket.state, "CLOSED", "BluetoothSocket.state enum is no equal to 'CLOSED'");\r
+ }, "BluetoothSocketState_close_enum");\r
+\r
+ t.done();\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_unreached("onSocketError exception:" + e.message);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocketState_open_enum</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocketState_open_enum
-//==== LABEL Check enum OPEN in socket
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA ADV
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,
- gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;
-
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- assert_equals(socket.state, "OPEN", "BluetoothSocket.state enum is no equal to 'OPEN'");
- socket.close();
- t.done();
- });
-
- onSocketError = t.step_func(function (e) {
- assert_unreached("onSocketError exception:" + e.message);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocketState_open_enum</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocketState_open_enum\r
+//==== LABEL Check enum OPEN in socket\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:state A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA ADV\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,\r
+ gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ assert_equals(socket.state, "OPEN", "BluetoothSocket.state enum is no equal to 'OPEN'");\r
+ socket.close();\r
+ t.done();\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_unreached("onSocketError exception:" + e.message);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA CBNIO
test(function () {
- check_no_interface_object("BluetoothSocketSuccessCallback");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothSocketSuccessCallback");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-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:
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_close</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_close
-//==== LABEL Proper close invocation without arguments - should work
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MNA MNAST MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketConnectedError,
- gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- retValue = socket.close();
- socket.onclose = t.step_func(function () {
- assert_equals(retValue, undefined, "close returns wrong value");
- t.done();
- });
- });
-
- onSocketConnectedError = t.step_func(function (e) {
- assert_unreached("onSocketConnectedError exception:" + e.message);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);
- } else {
- assert_unreached("Exception. reason: device.uuids.indexOf(CHAT_SERVICE_UUID) = " +
- device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device );
- }
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_close</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_close\r
+//==== LABEL Proper close invocation without arguments - should work\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:close M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MNA MNAST MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketConnectedError,\r
+ gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess, retValue = null;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ retValue = socket.close();\r
+ socket.onclose = t.step_func(function () {\r
+ assert_equals(retValue, undefined, "close returns wrong value");\r
+ t.done();\r
+ });\r
+ });\r
+\r
+ onSocketConnectedError = t.step_func(function (e) {\r
+ assert_unreached("onSocketConnectedError exception:" + e.message);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);\r
+ } else {\r
+ assert_unreached("Exception. reason: device.uuids.indexOf(CHAT_SERVICE_UUID) = " +\r
+ device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device);\r
+ }\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
Authors:
- Lukasz Bardeli <l.bardeli@samsung.com>
+Lukasz Bardeli <l.bardeli@samsung.com>
-->
<html>
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
//==== TEST_CRITERIA NIO
test(function () {
- check_no_interface_object("BluetoothSocket");
+ if (BT_SUPPORT) { // check network.bluetooth for Bluetooth_tv
+ check_no_interface_object("BluetoothSocket");
+ }
}, document.title);
</script>
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_onclose_callback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-
-<ul id="testdetails" style="display:none;">
- <li>Push "unregister service" button on the remote device"</li>
-</ul>
-
-<script>
-//==== TEST: BluetoothSocket_onclose_callback
-//==== LABEL Check if onClose callback function invoked
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== STEP When you find description in below, please unregister the service at the remote device.
-//==== EXPECT Pass.
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA ASG AT
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,
- gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;
-
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- socket.onmessage = t.step_func(function () {
- });
- socket.onclose = t.step_func(function () {
- t.done();
- });
- assert_type(socket.onclose, "function", "onclose in BluetoothSocket has wrong type after attaching function to it");
- document.getElementById("testdetails").style["display"] = "";
- });
-
- onSocketError = t.step_func(function (e) {
- assert_unreached("onSocketError exception:" + e.message);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
- } else {
- assert_unreached("device has no service");
- }
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_onclose_callback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+\r
+<ul id="testdetails" style="display:none;">\r
+ <li>Push "unregister service" button on the remote device"</li>\r
+</ul>\r
+\r
+<script>\r
+//==== TEST: BluetoothSocket_onclose_callback\r
+//==== LABEL Check if onClose callback function invoked\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== STEP When you find description in below, please unregister the service at the remote device.\r
+//==== EXPECT Pass.\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onclose A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA ASG AT\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,\r
+ gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ socket.onmessage = t.step_func(function () {\r
+ });\r
+ socket.onclose = t.step_func(function () {\r
+ t.done();\r
+ });\r
+ assert_type(socket.onclose, "function", "onclose in BluetoothSocket has wrong type after attaching function to it");\r
+ document.getElementById("testdetails").style["display"] = "";\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_unreached("onSocketError exception:" + e.message);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+ } else {\r
+ assert_unreached("device has no service");\r
+ }\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_onmessage_callback</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_onmessage_callback
-//==== LABEL Check if onMessage callback function invoked
-//==== PRIORITY P2
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA AT ASG
-
-setup({timeout: 180000});
-var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,
- gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;
-
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- socket.onmessage = t.step_func(function () {
- socket.close();
- t.done();
- });
- assert_type(socket.onmessage, "function", "onmessage in BluetoothSocket has wrong type after attaching function to it");
- socket.onclose = t.step_func(function () {
- });
- });
-
- onSocketError = t.step_func(function (e) {
- assert_unreached("onSocketError exception:" + e.message);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
- } else {
- assert_unreached("device has no service");
- }
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_onmessage_callback</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_onmessage_callback\r
+//==== LABEL Check if onMessage callback function invoked\r
+//==== PRIORITY P2\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:onmessage A\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA AT ASG\r
+\r
+setup({timeout: 180000});\r
+var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess, onBondingSuccess, onBondingError,\r
+ gotDeviceInfo, gotDeviceError, onSocketConnect, onSocketError;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ socket.onmessage = t.step_func(function () {\r
+ socket.close();\r
+ t.done();\r
+ });\r
+ assert_type(socket.onmessage, "function", "onmessage in BluetoothSocket has wrong type after attaching function to it");\r
+ socket.onclose = t.step_func(function () {\r
+ });\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_unreached("onSocketError exception:" + e.message);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+ } else {\r
+ assert_unreached("device has no service");\r
+ }\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
-
--->
-<html>
-<head>
-<title>BluetoothSocket_readData</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_readData
-//==== LABEL Check if readData method correct, after sending nothing
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MNA MR
-
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, retValue = null,
- onSocketConnectedError, gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
- socket.onmessage = t.step_func(function () {
- retValue = socket.readData();
- assert_type(retValue, "array", "readData of socket returns wrong type");
- assert_array_equals(retValue, [84, 101, 115, 116], "readData of socket returns wrong value");
- socket.close();
-
- t.done();
- });
- });
-
- onSocketConnectedError = t.step_func(function (e) {
- assert_unreached("onSocketConnectedError exception:" + e.message);
- });
-
- gotDeviceInfo = t.step_func(function (device) {
- if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);
- } else {
- assert_unreached("Exception. reason: device.uuids.indexOf(CHAT_SERVICE_UUID) = " +
- device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device );
- }
- });
-
- gotDeviceError = t.step_func(function (e) {
- assert_unreached("gotDeviceError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function () {
- adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_readData</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_readData\r
+//==== LABEL Check if readData method correct, after sending nothing\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:readData M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MNA MR\r
+\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, retValue = null,\r
+ onSocketConnectedError, gotDeviceInfo, gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+ socket.onmessage = t.step_func(function () {\r
+ retValue = socket.readData();\r
+ assert_type(retValue, "array", "readData of socket returns wrong type");\r
+ assert_array_equals(retValue, [84, 101, 115, 116], "readData of socket returns wrong value");\r
+ socket.close();\r
+\r
+ t.done();\r
+ });\r
+ });\r
+\r
+ onSocketConnectedError = t.step_func(function (e) {\r
+ assert_unreached("onSocketConnectedError exception:" + e.message);\r
+ });\r
+\r
+ gotDeviceInfo = t.step_func(function (device) {\r
+ if (device !== null && device.uuids.indexOf(CHAT_SERVICE_UUID) !== -1) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketConnectedError);\r
+ } else {\r
+ assert_unreached("Exception. reason: device.uuids.indexOf(CHAT_SERVICE_UUID) = " +\r
+ device.uuids.indexOf(CHAT_SERVICE_UUID) + " device = " + device);\r
+ }\r
+ });\r
+\r
+ gotDeviceError = t.step_func(function (e) {\r
+ assert_unreached("gotDeviceError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function () {\r
+ adapter.getDevice(REMOTE_DEVICE_ADDRESS, gotDeviceInfo, gotDeviceError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2012 Intel Corporation.
-Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of works must retain the original copyright notice, this list
- of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the original copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this work without
- specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Authors:
- Lei, ZhanX <zhanx.lei@intel.com>
- Lukasz Bardeli <l.bardeli@samsung.com>
- Arkadiusz Pietraszek <a.pietraszek@samsung.com>
--->
-<html>
-<head>
-<title>BluetoothSocket_writeData</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: BluetoothSocket_writeData
-//==== LABEL Check if writeData method work successfully
-//==== PRIORITY P1
-//==== EXECUTION_TYPE manual
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.
-//==== TEST_CRITERIA MMINA MR
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketError, onBondingSuccess,
- onBondingError, powerOnSuccess, textmsg = "Test", sendtextmsg = [], byteData, i;
-t.step(function () {
-
- add_result_callback(function() {
- clearBonding(REMOTE_DEVICE_ADDRESS);
- });
-
- onSocketConnect = t.step_func(function (socket) {
-
- for (i = 0; i < textmsg.length; i ++) {
- sendtextmsg[i] = textmsg.charCodeAt(i);
- }
- byteData = socket.writeData (sendtextmsg);
- assert_equals(byteData, textmsg.length, "socket writeData is byteData: " + byteData + " should be " + textmsg.length);
- socket.close();
- t.done();
- });
-
- onSocketError = t.step_func(function (e) {
- assert_unreached("onSocketError exception:" + e.message);
- });
-
- onBondingSuccess = t.step_func(function (device) {
- device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);
- });
-
- onBondingError = t.step_func(function (e) {
- assert_unreached("onBondingError exception:" + e.message);
- });
-
- powerOnSuccess = t.step_func(function () {
- adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- setPowered(t, adapter, powerOnSuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2012 Intel Corporation.\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All Rights Reserved\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+Lei, ZhanX <zhanx.lei@intel.com>\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+Arkadiusz Pietraszek <a.pietraszek@samsung.com>\r
+-->\r
+<html>\r
+<head>\r
+<title>BluetoothSocket_writeData</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: BluetoothSocket_writeData\r
+//==== LABEL Check if writeData method work successfully\r
+//==== PRIORITY P1\r
+//==== EXECUTION_TYPE manual\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothSocket:writeData M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. The remote device MUST register the service by pushing [Register service] button on tct-bt-helper.\r
+//==== TEST_CRITERIA MMINA MR\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketConnect, onSocketError, onBondingSuccess,\r
+ onBondingError, powerOnSuccess, textmsg = "Test", sendtextmsg = [], byteData, i;\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ add_result_callback(function () {\r
+ clearBonding(REMOTE_DEVICE_ADDRESS);\r
+ });\r
+\r
+ onSocketConnect = t.step_func(function (socket) {\r
+\r
+ for (i = 0; i < textmsg.length; i++) {\r
+ sendtextmsg[i] = textmsg.charCodeAt(i);\r
+ }\r
+ byteData = socket.writeData(sendtextmsg);\r
+ assert_equals(byteData, textmsg.length, "socket writeData is byteData: " + byteData + " should be " + textmsg.length);\r
+ socket.close();\r
+ t.done();\r
+ });\r
+\r
+ onSocketError = t.step_func(function (e) {\r
+ assert_unreached("onSocketError exception:" + e.message);\r
+ });\r
+\r
+ onBondingSuccess = t.step_func(function (device) {\r
+ device.connectToServiceByUUID(CHAT_SERVICE_UUID, onSocketConnect, onSocketError);\r
+ });\r
+\r
+ onBondingError = t.step_func(function (e) {\r
+ assert_unreached("onBondingError exception:" + e.message);\r
+ });\r
+\r
+ powerOnSuccess = t.step_func(function () {\r
+ adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ setPowered(t, adapter, powerOnSuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!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:
- Lukasz Bardeli <l.bardeli@samsung.com>
-
--->
-<html>
-<head>
-<title>Bluetooth_discoverDevices_successCallback_invalidcb</title>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-
-<div id="log"></div>
-<script>
-//==== TEST: Bluetooth_discoverDevices_successCallback_invalidcb
-//==== LABEL Check BluetoothDiscoverDevicesSuccessCallback() callback with invalid callback
-//==== PRIORITY P2
-//==== ONLOAD_DELAY 180
-//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
-//==== TEST_CRITERIA MTL
-setup({timeout: 180000});
-var adapter = null, t = async_test(document.title, {timeout: 180000}),
- exceptionName, incorrectListeners, i,
- stopDiscoverySuccess, discoverDevicesErrorCB, invalidCallback;
-
-t.step(function () {
-
- discoverDevicesErrorCB = t.step_func(function (e) {
- assert_unreached("discoverDevicesErrorCB exception:" + e.message);
- });
-
- stopDiscoverySuccess = t.step_func(function () {
- incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);
- for(i = 0; i < incorrectListeners.length; i++) {
- invalidCallback = incorrectListeners[i][0];
- exceptionName = incorrectListeners[i][1];
- assert_throws({name: exceptionName},
- function () {
- adapter.discoverDevices(invalidCallback, discoverDevicesErrorCB);
- }, exceptionName + " should be thrown - given incorrect successCallback.");
- }
- t.done();
- });
-
- adapter = tizen.bluetooth.getDefaultAdapter();
- stopDiscovery(t, adapter, stopDiscoverySuccess);
-});
-
-</script>
-</body>
-</html>
+<!DOCTYPE html>\r
+<!--\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+Lukasz Bardeli <l.bardeli@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>Bluetooth_discoverDevices_successCallback_invalidcb</title>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: Bluetooth_discoverDevices_successCallback_invalidcb\r
+//==== LABEL Check BluetoothDiscoverDevicesSuccessCallback() callback with invalid callback\r
+//==== PRIORITY P2\r
+//==== ONLOAD_DELAY 180\r
+//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M\r
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
+//==== TEST_CRITERIA MTL\r
+setup({timeout: 180000});\r
+var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+ exceptionName, incorrectListeners, i,\r
+ stopDiscoverySuccess, discoverDevicesErrorCB, invalidCallback;\r
+\r
+t.step(function () {\r
+ if (BT_SUPPORT) { // network.bluetooth support\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
+ assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
+ });\r
+\r
+ stopDiscoverySuccess = t.step_func(function () {\r
+ incorrectListeners = getListenerConversionExceptions(["onstarted", "ondevicefound", "ondevicedisappeared", "onfinished"]);\r
+ for (i = 0; i < incorrectListeners.length; i++) {\r
+ invalidCallback = incorrectListeners[i][0];\r
+ exceptionName = incorrectListeners[i][1];\r
+ assert_throws({ name: exceptionName },\r
+ function () {\r
+ adapter.discoverDevices(invalidCallback, discoverDevicesErrorCB);\r
+ }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+ }\r
+ t.done();\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getDefaultAdapter();\r
+ stopDiscovery(t, adapter, stopDiscoverySuccess);\r
+\r
+ } else {\r
+ t.done();\r
+ }\r
+});\r
+\r
+</script>\r
+</body>\r
+</html>\r
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>ReadValueSuccessCallback_notexist</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ReadValueSuccessCallback_notexist
-//==== LABEL Check if interface ReadValueSuccessCallback exists,it should not
-//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:ReadValueSuccessCallback U
-//==== SPEC_URL TBD
-//==== PRIORITY P3
-//==== TEST_CRITERIA CBNIO
-
-test(function () {
- check_no_interface_object("ReadValueSuccessCallback");
-}, document.title);
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ReadValueSuccessCallback_notexist</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ReadValueSuccessCallback_notexist\r
+//==== LABEL Check if interface ReadValueSuccessCallback exists,it should not\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:ReadValueSuccessCallback U\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P3\r
+//==== TEST_CRITERIA CBNIO\r
+\r
+test(function () {\r
+ if (BT_SUPPORT && LE_SUPPORT) { // check bluetooth and le support\r
+\r
+ check_no_interface_object("ReadValueSuccessCallback");\r
+\r
+ }\r
+}, document.title);\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-<!DOCTYPE html>
-<!--
-Copyright (c) 2015 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>ReadValueSuccessCallback_onread</title>
-<meta charset="utf-8"/>
-<script src="support/unitcommon.js"></script>
-<script src="support/bluetooth_common.js"></script>
-</head>
-<body>
-<div id="log"></div>
-<script>
-//==== TEST: ReadValueSuccessCallback_onread
-//==== LABEL Check if ReadValueSuccessCallback onread is called and if its arguments have proper type
-//==== EXECUTION_TYPE manual
-//==== ONLOAD_DELAY 30
-//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M
-//==== SPEC_URL TBD
-//==== PRIORITY P1
-//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.
-//==== TEST_CRITERIA CBOA CBT
-
-setup({timeout: 60000});
-
-var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,
- onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,
- WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false;
-
-t.step(function () {
- ReadValueSuccessCallback = t.step_func(function (value) {
- assert_type(value, "array", "foundDevice isn't an array");
- device.disconnect();
- t.done();
- });
-
- ReadValueErrorCallback = t.step_func(function (error) {
- assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- onconnected = t.step_func(function () {
- service = device.getService(device.uuids[0]);
- var descFlag = false;
- for (i = 0; i < service.characteristics.length; i++) {
- characteristic = service.characteristics[i];
- if (descFlag == false && characteristic != undefined) {
- characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);
- descFlag = true;
- }
- }
- });
-
- onerror = t.step_func(function (error) {
- assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- bleScanSuccessCallback = t.step_func(function (bledevice) {
- if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {
- adapter.stopScan();
- device = bledevice;
- if (flag == false) {
- device.connect(onconnected, onerror);
- flag = true;
- }
- }
- });
-
- bleScanErrorCallback = t.step_func(function (error) {
- assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);
- });
-
- adapter = tizen.bluetooth.getLEAdapter();
- adapter.stopScan();
- adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);
-});
-
-</script>
-</body>
+<!DOCTYPE html>\r
+<!--\r
+Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+Authors:\r
+ Xiaoyan Qian <xy.qian@samsung.com>\r
+\r
+-->\r
+<html>\r
+<head>\r
+<title>ReadValueSuccessCallback_onread</title>\r
+<meta charset="utf-8"/>\r
+<script src="support/unitcommon.js"></script>\r
+<script src="support/bluetooth_common.js"></script>\r
+</head>\r
+<body>\r
+<div id="log"></div>\r
+<script>\r
+//==== TEST: ReadValueSuccessCallback_onread\r
+//==== LABEL Check if ReadValueSuccessCallback onread is called and if its arguments have proper type\r
+//==== EXECUTION_TYPE manual\r
+//==== ONLOAD_DELAY 30\r
+//==== SPEC Tizen Web API:TBD:Bluetooth:ReadValueSuccessCallback:onread M\r
+//==== SPEC_URL TBD\r
+//==== PRIORITY P1\r
+//==== PRE The bluetooth of the remote/test device MUST support BLE and be turned on and discoverable from other devices.\r
+//==== TEST_CRITERIA CBOA CBT\r
+\r
+setup({timeout: 60000});\r
+\r
+var t = async_test(document.title, {timeout: 60000}), adapter, bleScanSuccessCallback, bleScanErrorCallback, service,\r
+ onconnected, onerror, characteristic, descriptor, ReadValueSuccessCallback, ReadValueErrorCallback, retVal = null,\r
+ WriteValueSuccessCallback, WriteValueErrorCallback, data = new Array(1, 2, 3, 4, 5, 6), device = null, flag = false;\r
+\r
+t.step(function () {\r
+ ReadValueSuccessCallback = t.step_func(function (value) {\r
+ assert_type(value, "array", "foundDevice isn't an array");\r
+ device.disconnect();\r
+ t.done();\r
+ });\r
+\r
+ ReadValueErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("readValue() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ onconnected = t.step_func(function () {\r
+ service = device.getService(device.uuids[0]);\r
+ var descFlag = false;\r
+ for (i = 0; i < service.characteristics.length; i++) {\r
+ characteristic = service.characteristics[i];\r
+ if (descFlag == false && characteristic != undefined) {\r
+ characteristic.readValue(ReadValueSuccessCallback, ReadValueErrorCallback);\r
+ descFlag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ onerror = t.step_func(function (error) {\r
+ assert_unreached("connect() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ bleScanSuccessCallback = t.step_func(function (bledevice) {\r
+ if (bledevice.address == REMOTE_BLE_DEVICE_ADDRESS && device == null) {\r
+ adapter.stopScan();\r
+ device = bledevice;\r
+ if (flag == false) {\r
+ device.connect(onconnected, onerror);\r
+ flag = true;\r
+ }\r
+ }\r
+ });\r
+\r
+ bleScanErrorCallback = t.step_func(function (error) {\r
+ assert_unreached("startScan() error callback was invoked: " + error.name + " msg: " + error.message);\r
+ });\r
+\r
+ adapter = tizen.bluetooth.getLEAdapter();\r
+ adapter.stopScan();\r
+ adapter.startScan(bleScanSuccessCallback, bleScanErrorCallback);\r
+});\r
+\r
+</script>\r
+</body>\r
</html>
\ No newline at end of file
-/*
-
-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:
-
- */
-
-
-MIN_BYTE = -128;
-MAX_BYTE = 127;
-MIN_OCTET = 0;
-MAX_OCTET = 255;
-MIN_SHORT = -32768;
-MAX_SHORT = 32767;
-MIN_UNSIGNED_SHORT = 0;
-MAX_UNSIGNED_SHORT = 65535;
-MIN_LONG = -2147483648;
-MAX_LONG = 2147483647;
-MIN_UNSIGNED_LONG = 0;
-MAX_UNSIGNED_LONG = 4294967295;
-MIN_LONG_LONG = -9223372036854775808;
-MAX_LONG_LONG = 9223372036854775807;
-MIN_UNSIGNED_LONG_LONG = 0;
-MAX_UNSIGNED_LONG_LONG = 18446744073709551615;
-
-TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};
-NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};
-INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};
-IO_EXCEPTION = {name: 'IOError'};
-SECURITY_EXCEPTION = {name: 'SecurityError'};
-
-
-(function () {
- var head_src = document.head.innerHTML;
- if (head_src.search(/\/testharness.js\W/) === -1) {
- document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');
- }
- if (head_src.search(/\/testharnessreport.js\W/) === -1) {
- document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');
- }
-})();
-
-var _registered_types = {};
-
-function _resolve_registered_type(type) {
- while (type in _registered_types) {
- type = _registered_types[type];
- }
- return type;
-}
-
-/**
- * Method checks extra argument for none argument method.
- * The only check is that method will not throw an exception.
- * Example usage:
- * checkExtraArgument(tizen.notification, "removeAll");
- *
- * @param object object
- * @param methodName string - name of the method
- */
-function checkExtraArgument(object, methodName) {
- var extraArgument = [
- null,
- undefined,
- "Tizen",
- 1,
- false,
- ["one", "two"],
- {argument: 1},
- function () {}
- ], i;
-
- for (i = 0; i < extraArgument.length; i++) {
- object[methodName](extraArgument[i]);
- }
-}
-
-/**
- * Method to validate conversion.
- * Example usage:
- * conversionTable = getTypeConversionExceptions("functionObject", true);
- * for(i = 0; i < conversionTable.length; i++) {
- * errorCallback = conversionTable[i][0];
- * exceptionName = conversionTable[i][1];
- *
- * assert_throws({name : exceptionName},
- * function () {
- * tizen.systemsetting.setProperty("HOME_SCREEN",
- * propertyValue, successCallback, errorCallback);
- * }, exceptionName + " should be thrown - given incorrect errorCallback.");
- * }
- *
- * @param conversionType
- * @param isOptional
- * @returns table of tables which contain value (index 0) and exceptionName (index 1)
- *
- */
-function getTypeConversionExceptions(conversionType, isOptional, isNullable) {
- var exceptionName = "TypeMismatchError",
- conversionTable;
- switch (conversionType) {
- case "enum":
- if(isNullable == true) {
- conversionTable = [
- [undefined, exceptionName],
- [0, exceptionName],
- [true, exceptionName],
- ["dummyInvalidEnumValue", exceptionName],
- [{ }, exceptionName]
- ];
- } else {
- conversionTable = [
- [undefined, exceptionName],
- [null, exceptionName],
- [0, exceptionName],
- [true, exceptionName],
- ["dummyInvalidEnumValue", exceptionName],
- [{ }, exceptionName]
- ];
- }
- break;
- case "double":
- conversionTable = [
- [undefined, exceptionName],
- [NaN, exceptionName],
- [Number.POSITIVE_INFINITY, exceptionName],
- [Number.NEGATIVE_INFINITY, exceptionName],
- ["TIZEN", exceptionName],
- [{ name : "TIZEN" }, exceptionName],
- [function () { }, exceptionName]
- ];
- break;
- case "object":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "functionObject":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [[], exceptionName],
- [{ }, exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "array":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [{ }, exceptionName],
- [function () { }, exceptionName],
- [undefined, exceptionName]
- ];
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- case "dictionary":
- conversionTable = [
- [true, exceptionName],
- [false, exceptionName],
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
- break;
- /* Add by SRC_Xian strat */
-
- case "boolean":
- conversionTable = [
- [NaN, exceptionName],
- [0, exceptionName],
- ["", exceptionName],
- ["TIZEN", exceptionName],
- [undefined, exceptionName]
- ];
-
- /* Add by SRC_Xian end */
-
- if (!isOptional) {
- conversionTable.push([null, exceptionName]);
- }
- break;
- default:
- assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");
- };
-
- return conversionTable;
-}
-
-
-function assert_type(obj, type, description) {
- var org_type = type, prop_name, prop_type, prop_value;
-
- type = _resolve_registered_type(type);
-
- if (typeof (type) === 'string') {
- type = type.toLowerCase();
- switch (type) {
- case 'object':
- case 'string':
- case 'number':
- case 'function':
- case 'boolean':
- case 'undefined':
- case 'xml':
- assert_equals(typeof (obj), type, description);
- break;
- case 'null':
- assert_true(obj === null, description);
- break;
- case 'array':
- assert_true(Array.isArray(obj), description);
- break;
- case 'date':
- assert_true(obj instanceof Date, description);
- break;
- case 'byte':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");
- assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'octet':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");
- assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'short':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");
- assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned short':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'long long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");
- assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");
- break;
- case 'unsigned long long':
- assert_equals(typeof (obj), 'number', description);
- assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");
- assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");
- assert_equals(obj % 1, 0, description + " - value is not an integer.");
- break;
- case 'double':
- assert_equals(typeof (obj), 'number', description);
- break;
- default:
- assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');
- }
- } else if (typeof (type) === 'function') {
- assert_true(obj instanceof type, description);
- } else if (typeof (type) === 'object') {
- for (prop_name in type) {
- prop_type = type[prop_name];
- if (prop_type === 'function') {
- assert_inherits(obj, prop_name);
- assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);
- } else {
- assert_own_property(obj, prop_name);
- }
- }
- } else {
- assert_unreached('Fix your test. Wrong type ' + org_type);
- }
-}
-
-function register_type(alias, type_spec) {
- _registered_types[alias] = type_spec;
-}
-
-/**
- * Method to check if attribute is const.
- * Example usage:
- * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);
- *
- * @param obj object to test which has const attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- var tmp;
- if (expectedValue === valueToAssign) {
- assert_unreached("Fix your test. The same values given for " + attributeName +
- " in 'value' and 'valueToSet' arguments.");
- }
- if (typeof (attributeName) === "string") {
- assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
- assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
- if (typeof (expectedType) !== "undefined") {
- if (expectedValue === null) {
- assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
- } else {
- assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
- }
- } else {
- assert_unreached("Fix your test. Wrong type " + expectedType);
- }
- tmp = obj[attributeName];
- obj[attributeName] = valueToAssign;
- assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");
- } else {
- assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
- }
-}
-
-/**
- * Method to check if attribute is readonly.
- * Example usage:
- * check_readonly(statusNotification, "postedTime", null, 'object', new Date());
- *
- * @param obj object to test which has readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);
-}
-
-/**
- * Method to check if attribute can be set to null.
- * Example usage:
- * check_not_nullable(syncInfo, "mode");
- *
- * @param obj object to test which has not nullable attribute
- * @param attributeName attribute name.
- */
-function check_not_nullable(obj, attributeName)
-{ var old_value = obj[attributeName];
- obj[attributeName] = null;
- assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");
- obj[attributeName] = old_value;
-}
-
-/**
- * Method to check NoInterfaceObject
- * Example usage:
- * check_no_interface_object("BluetoothAdapter")
- *
- * @param interfaceName interface name
- */
-function check_no_interface_object(interfaceName) {
- assert_throws({name: "TypeError"}, function () {
- tizen[interfaceName]();
- },"Wrong call as a function");
- assert_throws({name: "TypeError"}, function () {
- new tizen[interfaceName]();
- },"Wrong call as a new function");
- assert_throws({name: "TypeError"}, function () {
- ({}) instanceof tizen[interfaceName];
- },"instanceof exception");
- assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");
-}
-
-
-/**
- * Method to check Constructors
- * Example usage:
- * check_constructor("BluetoothAdapter")
- *
- * @param constructorName constructor name
- */
-
-function check_constructor(constructorName) {
- assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");
- assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);
- assert_throws({
- name: "TypeError"
- }, function () {
- tizen[constructorName]();
- }, "Constructor called as function.");
-}
-
-/**
- * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).
- * That method also checks if given method exists in a given object.
- * Example usage:
- * check_method_exists(tizen.notification, "get");
- *
- * @param obj object with method
- * @param methodName name of the method to check.
- */
-function check_method_exists(obj, methodName) {
- assert_type(obj[methodName], 'function', "Method does not exist.");
-}
-
-/**
- * Method to check extensibility of given object.
- * Method checks if new attribute and method can be added.
- * Example usage:
- * check_extensibility(tizen.notification);
- *
- * @param obj object to check
- */
-function check_extensibility(obj) {
- var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";
- obj.newDummyMethod = function() {
- return dummyMethodResult;
- }
- assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");
-
- obj.newDummyAttribute = dummyAttribute;
- assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");
-}
-
-/**
- * Method to check if attribute can be modify.
- * Example usage:
- * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");
- *
- * @param obj object to test which has not readonly attribute
- * @param attributeName attribute name.
- * @param expectedValue expected value of provided attribute name
- * @param expectedType expected type of provided attribute name
- * @param valueToAssign value to assign in order to check if attribute value can be modified
- */
-function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {
- if (expectedValue === valueToAssign) {
- assert_unreached("Fix your test. The same values given for " + attributeName +
- " in 'value' and 'valueToSet' arguments.");
- }
- if (typeof (attributeName) === "string") {
- assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");
- assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");
- if (typeof (expectedType) !== "undefined") {
- if (expectedValue === null) {
- assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");
- } else {
- assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");
- }
- } else {
- assert_unreached("Fix your test. Wrong type " + expectedType);
- }
- obj[attributeName] = valueToAssign;
- assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");
- } else {
- assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));
- }
-}
-
-/**
- * Method to check if whole array can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_array_assignments(message, "to", false);
- *
- * @param obj object which has the array as its property
- * @param array name of the array to check
- * @param isNullable indicates if the array can be null
- */
-function check_invalid_array_assignments(obj, array, isNullable) {
- var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],
- val = obj[array], i;
-
- if (!isNullable) {
- obj[array] = null;
- assert_not_equals(obj[array], null, "Non-nullable array was set to null");
- assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");
- assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");
- }
-
- for (i = 0 ; i < args.length ; i++) {
- obj[array] = args[i];
- assert_type(obj[array], "array", "Array type changed after assigning an invalid value");
- assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");
- }
-}
-
-/**
- * Method to check if an object can be overwritten with an invalid value.
- * Sample usage:
- * check_invalid_object_assignments(message, "body", false);
- *
- * @param parentObj object which has the 'obj' object as its property
- * @param obj name of the object to check
- * @param isNullable indicates if the object can be null
- */
-function check_invalid_obj_assignments(parentObj, obj, isNullable) {
- var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],
- val = parentObj[obj], i;
-
- if (!isNullable) {
- parentObj[obj] = null;
- assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");
- }
-
- for (i = 0 ; i < args.length ; i++) {
- parentObj[obj] = args[i];
- assert_equals(parentObj[obj], val, "The object was set to " + args[i]);
- }
-}
-
-/**
- * Method to validate conversion for listeners.
- * Example usage:
- * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);
- * for(i = 0; i < incorrectListeners.length; i++) {
- * packageInformationEventCallback = incorrectListeners[i][0];
- * exceptionName = incorrectListeners[i][1];
- * assert_throws({name : exceptionName},
- * function () {
- * tizen.package.setPackageInfoEventListener(packageInformationEventCallback);
- * }, exceptionName + " should be thrown - given incorrect successCallback.");
- * }
- *
- *
- * @param callbackNames Array with names
- * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)
- *
- */
-function getListenerConversionExceptions(callbackNames) {
- var result = [], conversionTable, i, j, listenerName;
- conversionTable = getTypeConversionExceptions("functionObject", false);
-
- for (i = 0; i < callbackNames.length; i++) {
- for (j = 0; j < conversionTable.length; j++) {
- listenerName = {};
- listenerName[callbackNames[i]] = conversionTable[j][0];
- result.push([listenerName, conversionTable[j][1]]);
- }
- }
-
- return result;
-}
+/*\r
+\r
+Copyright (c) 2013 Samsung Electronics Co., Ltd.\r
+\r
+Licensed under the Apache License, Version 2.0 (the License);\r
+you may not use this file except in compliance with the License.\r
+You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+Unless required by applicable law or agreed to in writing, software\r
+distributed under the License is distributed on an "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+See the License for the specific language governing permissions and\r
+limitations under the License.\r
+\r
+\r
+\r
+Authors:\r
+\r
+ */\r
+\r
+\r
+MIN_BYTE = -128;\r
+MAX_BYTE = 127;\r
+MIN_OCTET = 0;\r
+MAX_OCTET = 255;\r
+MIN_SHORT = -32768;\r
+MAX_SHORT = 32767;\r
+MIN_UNSIGNED_SHORT = 0;\r
+MAX_UNSIGNED_SHORT = 65535;\r
+MIN_LONG = -2147483648;\r
+MAX_LONG = 2147483647;\r
+MIN_UNSIGNED_LONG = 0;\r
+MAX_UNSIGNED_LONG = 4294967295;\r
+MIN_LONG_LONG = -9223372036854775808;\r
+MAX_LONG_LONG = 9223372036854775807;\r
+MIN_UNSIGNED_LONG_LONG = 0;\r
+MAX_UNSIGNED_LONG_LONG = 18446744073709551615;\r
+\r
+TYPE_MISMATCH_EXCEPTION = {name: 'TypeMismatchError'};\r
+NOT_FOUND_EXCEPTION = {name: 'NotFoundError'};\r
+INVALID_VALUES_EXCEPTION = {name: 'InvalidValuesError'};\r
+IO_EXCEPTION = {name: 'IOError'};\r
+SECURITY_EXCEPTION = {name: 'SecurityError'};\r
+BT_SUPPORT = webapis.featureconfig.getFeatureConfigBool("com.samsung/featureconf/bluetooth.support");\r
+LE_SUPPORT = webapis.featureconfig.getFeatureConfigBool("com.samsung/featureconf/bluetooth_le_supported");\r
+LE_GATT_SUPPORT = webapis.featureconfig.getFeatureConfigBool("com.samsung/featureconf/bluetooth_le_gatt_client_supported");\r
+\r
+(function () {\r
+ var head_src = document.head.innerHTML;\r
+ if (head_src.search(/\/testharness.js\W/) === -1) {\r
+ document.write('<script language="javascript" src="../resources/testharness.js"></script>\n');\r
+ }\r
+ if (head_src.search(/\/testharnessreport.js\W/) === -1) {\r
+ document.write('<script language="javascript" src="../resources/testharnessreport.js"></script>\n');\r
+ }\r
+})();\r
+\r
+var _registered_types = {};\r
+\r
+function _resolve_registered_type(type) {\r
+ while (type in _registered_types) {\r
+ type = _registered_types[type];\r
+ }\r
+ return type;\r
+}\r
+\r
+/**\r
+ * Method checks extra argument for none argument method.\r
+ * The only check is that method will not throw an exception.\r
+ * Example usage:\r
+ * checkExtraArgument(tizen.notification, "removeAll");\r
+ *\r
+ * @param object object\r
+ * @param methodName string - name of the method\r
+ */\r
+function checkExtraArgument(object, methodName) {\r
+ var extraArgument = [\r
+ null,\r
+ undefined,\r
+ "Tizen",\r
+ 1,\r
+ false,\r
+ ["one", "two"],\r
+ {argument: 1},\r
+ function () {}\r
+ ], i;\r
+\r
+ for (i = 0; i < extraArgument.length; i++) {\r
+ object[methodName](extraArgument[i]);\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to validate conversion.\r
+ * Example usage:\r
+ * conversionTable = getTypeConversionExceptions("functionObject", true);\r
+ * for(i = 0; i < conversionTable.length; i++) {\r
+ * errorCallback = conversionTable[i][0];\r
+ * exceptionName = conversionTable[i][1];\r
+ *\r
+ * assert_throws({name : exceptionName},\r
+ * function () {\r
+ * tizen.systemsetting.setProperty("HOME_SCREEN",\r
+ * propertyValue, successCallback, errorCallback);\r
+ * }, exceptionName + " should be thrown - given incorrect errorCallback.");\r
+ * }\r
+ *\r
+ * @param conversionType\r
+ * @param isOptional\r
+ * @returns table of tables which contain value (index 0) and exceptionName (index 1)\r
+ *\r
+ */\r
+function getTypeConversionExceptions(conversionType, isOptional, isNullable) {\r
+ var exceptionName = "TypeMismatchError",\r
+ conversionTable;\r
+ switch (conversionType) {\r
+ case "enum":\r
+ if(isNullable == true) {\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [0, exceptionName],\r
+ [true, exceptionName],\r
+ ["dummyInvalidEnumValue", exceptionName],\r
+ [{ }, exceptionName]\r
+ ];\r
+ } else {\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [null, exceptionName],\r
+ [0, exceptionName],\r
+ [true, exceptionName],\r
+ ["dummyInvalidEnumValue", exceptionName],\r
+ [{ }, exceptionName]\r
+ ];\r
+ }\r
+ break;\r
+ case "double":\r
+ conversionTable = [\r
+ [undefined, exceptionName],\r
+ [NaN, exceptionName],\r
+ [Number.POSITIVE_INFINITY, exceptionName],\r
+ [Number.NEGATIVE_INFINITY, exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [{ name : "TIZEN" }, exceptionName],\r
+ [function () { }, exceptionName]\r
+ ];\r
+ break;\r
+ case "object":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "functionObject":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [[], exceptionName],\r
+ [{ }, exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "array":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [{ }, exceptionName],\r
+ [function () { }, exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ case "dictionary":\r
+ conversionTable = [\r
+ [true, exceptionName],\r
+ [false, exceptionName],\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+ break;\r
+ /* Add by SRC_Xian strat */\r
+\r
+ case "boolean":\r
+ conversionTable = [\r
+ [NaN, exceptionName],\r
+ [0, exceptionName],\r
+ ["", exceptionName],\r
+ ["TIZEN", exceptionName],\r
+ [undefined, exceptionName]\r
+ ];\r
+\r
+ /* Add by SRC_Xian end */\r
+\r
+ if (!isOptional) {\r
+ conversionTable.push([null, exceptionName]);\r
+ }\r
+ break;\r
+ default:\r
+ assert_unreached("Fix your test. Wrong conversionType '" + conversionType + "'.");\r
+ };\r
+\r
+ return conversionTable;\r
+}\r
+\r
+\r
+function assert_type(obj, type, description) {\r
+ var org_type = type, prop_name, prop_type, prop_value;\r
+\r
+ type = _resolve_registered_type(type);\r
+\r
+ if (typeof (type) === 'string') {\r
+ type = type.toLowerCase();\r
+ switch (type) {\r
+ case 'object':\r
+ case 'string':\r
+ case 'number':\r
+ case 'function':\r
+ case 'boolean':\r
+ case 'undefined':\r
+ case 'xml':\r
+ assert_equals(typeof (obj), type, description);\r
+ break;\r
+ case 'null':\r
+ assert_true(obj === null, description);\r
+ break;\r
+ case 'array':\r
+ assert_true(Array.isArray(obj), description);\r
+ break;\r
+ case 'date':\r
+ assert_true(obj instanceof Date, description);\r
+ break;\r
+ case 'byte':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_BYTE, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_BYTE, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'octet':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_OCTET, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_OCTET, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'short':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_SHORT, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_SHORT, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'unsigned short':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_UNSIGNED_SHORT, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_UNSIGNED_SHORT, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_LONG, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'unsigned long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'long long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_LONG_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_LONG_LONG, description + " - value too high.");\r
+ assert_equals(Math.abs(obj % 1), 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'unsigned long long':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ assert_greater_than_equal(obj, MIN_UNSIGNED_LONG_LONG, description + " - value too low.");\r
+ assert_less_than_equal(obj, MAX_UNSIGNED_LONG_LONG, description + " - value too high.");\r
+ assert_equals(obj % 1, 0, description + " - value is not an integer.");\r
+ break;\r
+ case 'double':\r
+ assert_equals(typeof (obj), 'number', description);\r
+ break;\r
+ default:\r
+ assert_unreached('Fix your test. Wrong type \'' + org_type + '\'');\r
+ }\r
+ } else if (typeof (type) === 'function') {\r
+ assert_true(obj instanceof type, description);\r
+ } else if (typeof (type) === 'object') {\r
+ for (prop_name in type) {\r
+ prop_type = type[prop_name];\r
+ if (prop_type === 'function') {\r
+ assert_inherits(obj, prop_name);\r
+ assert_equals(typeof obj[prop_name], prop_type, 'Object should have method ' + prop_name);\r
+ } else {\r
+ assert_own_property(obj, prop_name);\r
+ }\r
+ }\r
+ } else {\r
+ assert_unreached('Fix your test. Wrong type ' + org_type);\r
+ }\r
+}\r
+\r
+function register_type(alias, type_spec) {\r
+ _registered_types[alias] = type_spec;\r
+}\r
+\r
+/**\r
+ * Method to check if attribute is const.\r
+ * Example usage:\r
+ * check_const(tizen.bluetooth.deviceMinor, 'TOY_DOLL', 0x03, 'number', 0x29B);\r
+ *\r
+ * @param obj object to test which has const attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_const(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+ var tmp;\r
+ if (expectedValue === valueToAssign) {\r
+ assert_unreached("Fix your test. The same values given for " + attributeName +\r
+ " in 'value' and 'valueToSet' arguments.");\r
+ }\r
+ if (typeof (attributeName) === "string") {\r
+ assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");\r
+ assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");\r
+ if (typeof (expectedType) !== "undefined") {\r
+ if (expectedValue === null) {\r
+ assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");\r
+ } else {\r
+ assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");\r
+ }\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type " + expectedType);\r
+ }\r
+ tmp = obj[attributeName];\r
+ obj[attributeName] = valueToAssign;\r
+ assert_equals(obj[attributeName], tmp, attributeName + " can be modified.");\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to check if attribute is readonly.\r
+ * Example usage:\r
+ * check_readonly(statusNotification, "postedTime", null, 'object', new Date());\r
+ *\r
+ * @param obj object to test which has readonly attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_readonly(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+ check_const(obj, attributeName, expectedValue, expectedType, valueToAssign);\r
+}\r
+\r
+/**\r
+ * Method to check if attribute can be set to null.\r
+ * Example usage:\r
+ * check_not_nullable(syncInfo, "mode");\r
+ *\r
+ * @param obj object to test which has not nullable attribute\r
+ * @param attributeName attribute name.\r
+ */\r
+function check_not_nullable(obj, attributeName)\r
+{ var old_value = obj[attributeName];\r
+ obj[attributeName] = null;\r
+ assert_not_equals(obj[attributeName], null, "Attribute " + attributeName + " can be set to null.");\r
+ obj[attributeName] = old_value;\r
+}\r
+\r
+/**\r
+ * Method to check NoInterfaceObject\r
+ * Example usage:\r
+ * check_no_interface_object("BluetoothAdapter")\r
+ *\r
+ * @param interfaceName interface name\r
+ */\r
+function check_no_interface_object(interfaceName) {\r
+ assert_throws({name: "TypeError"}, function () {\r
+ tizen[interfaceName]();\r
+ },"Wrong call as a function");\r
+ assert_throws({name: "TypeError"}, function () {\r
+ new tizen[interfaceName]();\r
+ },"Wrong call as a new function");\r
+ assert_throws({name: "TypeError"}, function () {\r
+ ({}) instanceof tizen[interfaceName];\r
+ },"instanceof exception");\r
+ assert_equals(tizen[interfaceName], undefined, interfaceName + " is not undefined.");\r
+}\r
+\r
+\r
+/**\r
+ * Method to check Constructors\r
+ * Example usage:\r
+ * check_constructor("BluetoothAdapter")\r
+ *\r
+ * @param constructorName constructor name\r
+ */\r
+\r
+function check_constructor(constructorName) {\r
+ assert_true(constructorName in tizen, "No " + constructorName + " in tizen.");\r
+ assert_false({} instanceof tizen[constructorName],"Custom object is not instance of " + constructorName);\r
+ assert_throws({\r
+ name: "TypeError"\r
+ }, function () {\r
+ tizen[constructorName]();\r
+ }, "Constructor called as function.");\r
+}\r
+\r
+/**\r
+ * Method to check if given method can be overridden in a given object - (TEMPORARY REMOVED).\r
+ * That method also checks if given method exists in a given object.\r
+ * Example usage:\r
+ * check_method_exists(tizen.notification, "get");\r
+ *\r
+ * @param obj object with method\r
+ * @param methodName name of the method to check.\r
+ */\r
+function check_method_exists(obj, methodName) {\r
+ assert_type(obj[methodName], 'function', "Method does not exist.");\r
+}\r
+\r
+/**\r
+ * Method to check extensibility of given object.\r
+ * Method checks if new attribute and method can be added.\r
+ * Example usage:\r
+ * check_extensibility(tizen.notification);\r
+ *\r
+ * @param obj object to check\r
+ */\r
+function check_extensibility(obj) {\r
+ var dummyAttribute = "dummyAttributeValue", dummyMethodResult = "dummyMethodResultValue";\r
+ obj.newDummyMethod = function() {\r
+ return dummyMethodResult;\r
+ }\r
+ assert_equals(obj.newDummyMethod(), dummyMethodResult, "Incorrect result from added method.");\r
+\r
+ obj.newDummyAttribute = dummyAttribute;\r
+ assert_equals(obj.newDummyAttribute, dummyAttribute, "Incorrect result from added attribute.");\r
+}\r
+\r
+/**\r
+ * Method to check if attribute can be modify.\r
+ * Example usage:\r
+ * check_attr(downloadRequest, "fileName", default_val, "string", "file_name.html");\r
+ *\r
+ * @param obj object to test which has not readonly attribute\r
+ * @param attributeName attribute name.\r
+ * @param expectedValue expected value of provided attribute name\r
+ * @param expectedType expected type of provided attribute name\r
+ * @param valueToAssign value to assign in order to check if attribute value can be modified\r
+ */\r
+function check_attribute(obj, attributeName, expectedValue, expectedType, valueToAssign) {\r
+ if (expectedValue === valueToAssign) {\r
+ assert_unreached("Fix your test. The same values given for " + attributeName +\r
+ " in 'value' and 'valueToSet' arguments.");\r
+ }\r
+ if (typeof (attributeName) === "string") {\r
+ assert_true(attributeName in obj, "Name " + attributeName + " doesn't exist in provided object.");\r
+ assert_equals(obj[attributeName], expectedValue, "Value of " + attributeName + " is diffrent.");\r
+ if (typeof (expectedType) !== "undefined") {\r
+ if (expectedValue === null) {\r
+ assert_type(obj[attributeName], "object", "Type of " + attributeName + " is different.");\r
+ } else {\r
+ assert_type(obj[attributeName], expectedType, "Type of " + attributeName + " is different.");\r
+ }\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type " + expectedType);\r
+ }\r
+ obj[attributeName] = valueToAssign;\r
+ assert_equals(obj[attributeName], valueToAssign, attributeName + " can be modified.");\r
+ } else {\r
+ assert_unreached("Fix your test. Wrong type of name " + typeof (attributeName));\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to check if whole array can be overwritten with an invalid value.\r
+ * Sample usage:\r
+ * check_invalid_array_assignments(message, "to", false);\r
+ *\r
+ * @param obj object which has the array as its property\r
+ * @param array name of the array to check\r
+ * @param isNullable indicates if the array can be null\r
+ */\r
+function check_invalid_array_assignments(obj, array, isNullable) {\r
+ var args = [undefined, true, false, NaN, 0, "TIZEN", {}, function () {}],\r
+ val = obj[array], i;\r
+\r
+ if (!isNullable) {\r
+ obj[array] = null;\r
+ assert_not_equals(obj[array], null, "Non-nullable array was set to null");\r
+ assert_type(obj[array], "array", "Non-nullable array type changed after assigning null");\r
+ assert_equals(obj[array].toString(), val.toString(), "Non-nullable array contents changed after assigning null");\r
+ }\r
+\r
+ for (i = 0 ; i < args.length ; i++) {\r
+ obj[array] = args[i];\r
+ assert_type(obj[array], "array", "Array type changed after assigning an invalid value");\r
+ assert_equals(obj[array].toString(), val.toString(), "Array contents changed after assigning an invalid value");\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to check if an object can be overwritten with an invalid value.\r
+ * Sample usage:\r
+ * check_invalid_object_assignments(message, "body", false);\r
+ *\r
+ * @param parentObj object which has the 'obj' object as its property\r
+ * @param obj name of the object to check\r
+ * @param isNullable indicates if the object can be null\r
+ */\r
+function check_invalid_obj_assignments(parentObj, obj, isNullable) {\r
+ var args = [undefined, true, false, NaN, 0, "TIZEN", function () {}],\r
+ val = parentObj[obj], i;\r
+\r
+ if (!isNullable) {\r
+ parentObj[obj] = null;\r
+ assert_equals(parentObj[obj], val, "Non-nullable obj was modified after assigning null");\r
+ }\r
+\r
+ for (i = 0 ; i < args.length ; i++) {\r
+ parentObj[obj] = args[i];\r
+ assert_equals(parentObj[obj], val, "The object was set to " + args[i]);\r
+ }\r
+}\r
+\r
+/**\r
+ * Method to validate conversion for listeners.\r
+ * Example usage:\r
+ * incorrectListeners = getListenerConversionExceptions(["oninstalled", "onupdated", "onuninstalled"]);\r
+ * for(i = 0; i < incorrectListeners.length; i++) {\r
+ * packageInformationEventCallback = incorrectListeners[i][0];\r
+ * exceptionName = incorrectListeners[i][1];\r
+ * assert_throws({name : exceptionName},\r
+ * function () {\r
+ * tizen.package.setPackageInfoEventListener(packageInformationEventCallback);\r
+ * }, exceptionName + " should be thrown - given incorrect successCallback.");\r
+ * }\r
+ *\r
+ *\r
+ * @param callbackNames Array with names\r
+ * @returns {Array} table of tables which contain incorrect listener (index 0) and exceptionName (index 1)\r
+ *\r
+ */\r
+function getListenerConversionExceptions(callbackNames) {\r
+ var result = [], conversionTable, i, j, listenerName;\r
+ conversionTable = getTypeConversionExceptions("functionObject", false);\r
+\r
+ for (i = 0; i < callbackNames.length; i++) {\r
+ for (j = 0; j < conversionTable.length; j++) {\r
+ listenerName = {};\r
+ listenerName[callbackNames[i]] = conversionTable[j][0];\r
+ result.push([listenerName, conversionTable[j][1]]);\r
+ }\r
+ }\r
+\r
+ return result;\r
+}\r
<set name="Bluetooth01_tv" type="js">
<capabilities>
<capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
- <capability name="http://tizen.org/feature/network.bluetooth"/>
+ <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
</capabilities>
<testcase purpose="Check if is possible to call BluetoothAdapterChangeCallback in new expresion" type="compliance" status="approved" component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" priority="P3" id="BluetoothAdapterChangeCallback_notexist">
<description>
<set name="Bluetooth02_tv" type="js">
<capabilities>
<capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
- <capability name="http://tizen.org/feature/network.bluetooth"/>
+ <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
</capabilities>
<testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" id="BluetoothManager_toByteArray_exist" priority="P0" purpose="Check if toByteArray method exists">
<description>
<set name="Bluetooth04_BLE_tv" type="js">
<capabilities>
<capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
- <capability name="http://tizen.org/feature/network.bluetooth"/>
- <capability name="http://tizen.org/feature/network.bluetooth.le"/>
+ <!-- <capability name="http://tizen.org/feature/network.bluetooth"/>
+ <capability name="http://tizen.org/feature/network.bluetooth.le"/> -->
</capabilities>
<testcase purpose="Check if BluetoothLEDevice/Manufacturer/ServiceData attribues exist and have proper traits" onload_delay="180" priority = "P3" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothLEAttributes">
<description>
</testcase>
</set>
<set name="Bluetooth_BLE_GATT" type="js">
- <capabilities>
+ <!-- <capabilities>
<capability name="http://tizen.org/feature/network.bluetooth"/>
<capability name="http://tizen.org/feature/network.bluetooth.le"/>
<capability name="http://tizen.org/feature/network.bluetooth.le.gatt.client"/>
- </capabilities>
+ </capabilities> -->
<testcase purpose="Check uuid attribute in BluetoothGATTService is readonly" onload_delay="180" type="compliance" status="approved" priority = "P1" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothGATTService_serviceUuid_attribute">
<description>
<pre_condition>The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>
<set name="Bluetooth01_tv" type="js">
<capabilities>
<capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
- <capability name="http://tizen.org/feature/network.bluetooth"/>
+ <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
</capabilities>
<testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapterChangeCallback_notexist" priority="P3" purpose="Check if is possible to call BluetoothAdapterChangeCallback in new expresion">
<description>
<set name="Bluetooth02_tv" type="js">
<capabilities>
<capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
- <capability name="http://tizen.org/feature/network.bluetooth"/>
+ <!-- <capability name="http://tizen.org/feature/network.bluetooth"/> -->
</capabilities>
<testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="auto" id="BluetoothManager_toByteArray_exist" priority="P0" purpose="Check if toByteArray method exists">
<description>
<set name="Bluetooth04_BLE_tv" type="js">
<capabilities>
<capability name="http://tizen.org/feature/profile"><value>TV</value></capability>
- <capability name="http://tizen.org/feature/network.bluetooth"/>
- <capability name="http://tizen.org/feature/network.bluetooth.le"/>
+ <!-- <capability name="http://tizen.org/feature/network.bluetooth"/>
+ <capability name="http://tizen.org/feature/network.bluetooth.le"/> -->
</capabilities>
<testcase purpose="Check if BluetoothLEDevice/Manufacturer/ServiceData attribues exist and have proper traits" onload_delay="180" priority = "P3" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothLEAttributes">
<description>
</testcase>
</set>
<set name="Bluetooth_BLE_GATT" type="js">
- <capabilities>
+ <!-- <capabilities>
<capability name="http://tizen.org/feature/network.bluetooth"/>
<capability name="http://tizen.org/feature/network.bluetooth.le"/>
<capability name="http://tizen.org/feature/network.bluetooth.le.gatt.client"/>
- </capabilities>
+ </capabilities> -->
<testcase purpose="Check uuid attribute in BluetoothGATTService is readonly" onload_delay="180" priority="P1" component="TizenAPI/Communication/Bluetooth" execution_type="manual" id="BluetoothGATTService_serviceUuid_attribute">
<description>
<pre_condition>The bluetooth of the BLE remote/test device MUST support BLE and be turned on and discoverable from other devices.</pre_condition>