[bluetooth] Adding bond cleanup after manual tests 85/237185/1
authorArkadiusz Pietraszek <a.pietraszek@partner.samsung.com>
Wed, 4 Mar 2020 12:05:34 +0000 (13:05 +0100)
committerJihun Park <jihun87.park@samsung.com>
Fri, 26 Jun 2020 00:58:50 +0000 (00:58 +0000)
When tests are run on odroid(xu3) device with bluetooth adapter attached via usb, destroying bond after each test case significantly speeds up process of testing.
https://code.sec.samsung.net/jira/browse/XWALK-2081

[Verification]
TCT pass rate 100% on mobile device.
1 test case fails on odroid, waiting for fix.

Change-Id: I75296ca5a76256fec1842e61d064273bc8d82cbe
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
(cherry picked from commit 7e7993f719bd2cff159144b18f010c15a0c93617)

31 files changed:
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_bondingDevice.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_deviceaddress_correct.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_devicebonded.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_devicename_correct.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_deviceuuid_correct.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_errorCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_errorCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_successCallback_TypeMismatch.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_successCallback_invalid_cb.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_with_successCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClass.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothClass_hasService.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_connectToServiceByUUID.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_connectToServiceByUUID_onerror.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothDevice_connectToServiceByUUID_with_errorCallback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_onconnect_attribute.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocketState_open_enum.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_close.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_onclose_callback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_onmessage_callback.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_readData.html
common/tct-bluetooth-tizen-tests/bluetooth/BluetoothSocket_writeData.html
common/tct-bluetooth-tizen-tests/bluetooth/support/bluetooth_common.js

index 5fc143a13eaa450785e32493ecc1c0ac893aaff6..20723312057e7350e351b68f7c5070665d110d2f 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -44,11 +45,15 @@ 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 () {
index 927bac41d4e02d825beda38d6985ae56402b3efb..c81f7b6664a80b778c48607c6f8ef821011a4edc 100755 (executable)
@@ -1,32 +1,34 @@
 <!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, 
+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 
+* 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 
+* 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 
+* 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.  
+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>
@@ -54,6 +56,10 @@ var adapter = null, t = async_test(document.title, {timeout: 180000}), discoverD
     stopDiscoverySuccess;
 t.step(function () {
 
+    add_result_callback(function() {
+        clearBonding(REMOTE_DEVICE_ADDRESS);
+    });
+
     discoverDevicesSuccessCallback = {
         onstarted: t.step_func (function () {
         }),
@@ -62,7 +68,7 @@ t.step(function () {
         ondevicedisappeared:  t.step_func (function (address) {
         }),
         onfinished:  t.step_func (function (devices) {
-            if (devices.length > 0) {    
+            if (devices.length > 0) {
                 adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess, onBondingError);
             } else {
                 setTimeout(setstopDiscoverySuccess, 1000);
index 553b41f3b9db256fc1182b7a72f452dabe688b27..ddda24f104d3ab1ee7db5949acea13657c6387b9 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -27,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
         Lei, ZhanX <zhanx.lei@intel.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -52,6 +54,10 @@ 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();
index 6b1c7ae67cc306dfdb19c882cdf280a060428702..b539e3e0a54303156265b89e16650f767228c3c0 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -27,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
         Lei, ZhanX <zhanx.lei@intel.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -52,6 +54,10 @@ 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();
index a40b35e00b265e2138f6a13d24029396b59b2509..e56c1a6cddd73ee75491be9418591bb2b65e8aa4 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -27,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
         Lei, ZhanX <zhanx.lei@intel.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 
@@ -53,6 +55,10 @@ 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();
index dcfd17c96fc992efae7baeea4c5a7971d3b0dc7b..e864f6ba7ab7f8403e428f412b211785d43c366a 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -27,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
         Lei, ZhanX <zhanx.lei@intel.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 
@@ -54,6 +56,10 @@ var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess,
     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";
index a354e44d2a3c0f5c08f5a550edd8459f6d8ef59d..cd6863b969a906bf6dba3a0181b19256d6cc8a58 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
@@ -53,6 +55,11 @@ 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();
index c0a825afd1a0aa70800359bd3894d8867e16acf6..31fb34365cb097acac889b0db49c21aec5278089 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -44,6 +45,11 @@ 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.");
     });
index 11605fe4b7b400b6193e3b4e8bc9d69cb52d3f7e..ec6e05127fe8e2c9a3ca5ebf3317ee0ac81ce3d4 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -45,6 +46,10 @@ var t = async_test(document.title, {timeout: 180000}),
     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);
index 8cc3c41d4e6202d64517a37c21c746fc422786c7..21748939d188dae8e770fdbd2931a2ae81ac5f87 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -43,6 +44,11 @@ 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) {
index 9f82326bad2fe540cb11d3f0c5280023dde6702c..3b2f6082fc4a266656608fc9f83499fb9796e4f3 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -44,6 +45,10 @@ var adapter = null, t = async_test(document.title, {timeout: 180000}), exception
     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.");
index e703efb3292db6e69f8ead16d62946fce7708ad2..72ebc33d1c1a03cb871a335d07dabcca6088cffb 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
@@ -52,6 +54,11 @@ 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();
     });
index 23770430bd90f40a9fc3d3b64c18b7c8cdcc2ae7..1bf138acb7ac6e643b54f28802f61e79f1d2ca78 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -43,6 +43,11 @@ 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();
     });
index d2b6abc7a6d34ad243c09a70e86a38cad71879e3..574e637a06df98143a68734d95f9c66c48a40f70 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -44,6 +45,11 @@ 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.");
index f09f970d84ac0a1dd616ef8c2b4ce6bdab25167f..ae0058c7d6fc95c5f7605ce30aa5e4932660728a 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
 
 -->
 
@@ -54,6 +56,11 @@ 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();
index 7bd55cbba727b3a76bf3eb780bc6209be95ab53d..bae6b35dae76aa9724395112ce9d1dadb7145ca1 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
 
 -->
 
@@ -62,6 +64,10 @@ 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) {
index c0a707abb2d3206c1e7baa9ef73cd3639f929536..6d0348029c84371248dc4ccf9d951f6c51f4cbe9 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Witold Choinkowski <w.choinkowsk@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -57,7 +58,13 @@ var t = async_test(document.title, {timeout: 180000}), adapter, gotDeviceInfo, g
         onBondingSuccess, onBondingError, powerOnSuccess, minor, major, devService;
 
 t.step(function () {
+
+    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:");
index 1d2a82fc57ee49f7d53a75c6409a6f933366368d..a066390c2e38a0c59b926e4bf7968f3542fdc1df 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
 
 -->
 
@@ -53,6 +55,11 @@ setup({timeout: 180000});
 var adapter = null, t = async_test(document.title, {timeout: 180000}), gotDeviceInfo,
     gotDeviceError, onBondingSuccess, onBondingError, powerOnSuccess;
 t.step(function () {
+
+    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");
index 41379c99a4f827e844bc2bf8fc4cf70cdc065f22..c109c67339a7c15c1877292fcc09e8aa966f6400 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Witold Choinkowski <w.choinkowsk@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -71,6 +72,11 @@ var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess,
     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");
index 1bbf8b994810bffed34c937279916ecc61006cd7..67abe2956eb9c859324fcdefe769e57b15e65bd9 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
@@ -53,6 +55,11 @@ 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");
index e919504dc75f6e3836cbf28635f3843687402985..98af9bfaf0cb5b78fea9f6bcc4f3f99ac227e9d9 100755 (executable)
@@ -1,32 +1,34 @@
 <!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, 
+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 
+* 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 
+* 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 
+* 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.  
-  
+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>
@@ -52,6 +54,11 @@ 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");
     });
index 80b109aacc0e6dacd9d44f1d7cd8e53fe4cefdbc..2a16e1a0f76bb3c2c65e68abde41948f8330f757 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -43,6 +44,11 @@ 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();
index 80ed13b91ed0d479e1e46b959eeecffbbf7d2d3d..bae85d044e77920ae8a07bbbac0a37cc5580e672 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Witold Choinkowski <w.choinkowsk@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 -->
 <html>
 
@@ -55,6 +56,11 @@ 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);
     });
@@ -101,7 +107,7 @@ t.step(function () {
         document.getElementById("testdetails").style["display"] = "";
     });
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCallback, onError);  
+    adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCallback, onError);
 });
 
 </script>
index 1349a8cb5e5790c465c4ec584ad14b28fba2ea06..4606d53ba5e7a1a1161e7ec4afcd7703f81fe300 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Witold Choinkowski <w.choinkowsk@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -75,6 +76,11 @@ var t = async_test(document.title, {timeout: 180000}), adapter, onSocketConnect,
     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 () {
index a190cfa2c2993dd2f345e7843f803b7bd465076b..4065bce17bcafdc2c455cff00d64833e0217b555 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -27,6 +28,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 Authors:
         Lei, ZhanX <zhanx.lei@intel.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -53,6 +55,10 @@ var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess,
 
 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();
index 0a41930aa3d22f5e3fdd61d880ff4edd970a456a..d52036f446e87fd938f6168521446b761c9b7013 100755 (executable)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!--
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -19,6 +19,7 @@ limitations under the License.
 
 Authors:
         Lukasz Bardeli <l.bardeli@samsung.com>
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 -->
 <html>
@@ -44,6 +45,10 @@ var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketC
     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 () {
index 4ceaa0555b5b4ebfd0efc05f329b5800786d1c2f..41ea9f5c05b8a3dbcd1868ea770a209766e404b5 100755 (executable)
@@ -1,32 +1,34 @@
 <!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, 
+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 
+* 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 
+* 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 
+* 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.  
+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>
@@ -60,6 +62,11 @@ var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess,
     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 () {
         });
index 2e1b6adfd5fa9ea269a5c05debed173625c8fb6a..5b92eecf403bc012947a74277af91f53c1bb37a5 100755 (executable)
@@ -1,32 +1,34 @@
 <!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, 
+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 
+* 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 
+* 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 
+* 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.  
+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>
@@ -54,6 +56,10 @@ var t = async_test(document.title, {timeout: 180000}), adapter, powerOnSuccess,
 
 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();
index 54e710630361b4b77117260a1bb164d67915f139..270f33c90ed4a27adab9294c8c09f73d5b6466bf 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -21,13 +22,14 @@ 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 
+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>
@@ -54,6 +56,10 @@ var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketC
     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();
index 1e787df0b2d0470b618726c8731f781097cf6012..a4d53ac08a54eb0b445e4cdc2a838221a9efecf2 100755 (executable)
@@ -1,6 +1,7 @@
 <!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:
@@ -28,6 +29,7 @@ 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>
@@ -52,6 +54,10 @@ var adapter = null, t = async_test(document.title, {timeout: 180000}), onSocketC
     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 ++) {
index 766963ecc4e919f58df61e10478db6037c45933e..680e8e4a68b0ea2b99f79c8d60b373073759f5f6 100755 (executable)
@@ -1,6 +1,6 @@
 /*
 
-Copyright (c) 2013 Samsung Electronics Co., Ltd.
+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.
@@ -14,9 +14,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 
-
-
 Authors:
+        Unknown Samsung Engineer(s)
+        Arkadiusz Pietraszek <a.pietraszek@samsung.com>
 
 */
 
@@ -370,4 +370,8 @@ function assertTypeMismatch(t, e) {
         assert_unreached("uagent search not found:" + e.message);
     }
 }
+
+function clearBonding(deviceAddress) {
+    tizen.bluetooth.getDefaultAdapter().destroyBonding(deviceAddress);
+}
 // Add common apis from Xi'an end