[Bluetooth] cleanup invalid_cb
authorWitold Choinkowski <w.choinkowsk@samsung.com>
Tue, 24 Sep 2013 13:33:27 +0000 (15:33 +0200)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Fri, 4 Oct 2013 11:46:28 +0000 (11:46 +0000)
Change-Id: I1a6d05ff3344a195b43a397181092ac7b12797f5

30 files changed:
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_createBonding_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_destroyBonding_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_discoverDevices_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setChangeListener_listener_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setName_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setPowered_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setPowered_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setVisible_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_setVisible_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_stopDiscovery_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothHealthApplication_unregister_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothHealthApplication_unregister_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothHealthProfileHandler_registerSinkApplication_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_errorCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/BluetoothServiceHandler_unregister_successCallback_invalid_cb.html
tct-bluetooth-tizen-tests/bluetooth/Bluetooth_discoverDevices_successCallback_invalidcb.html
tct-bluetooth-tizen-tests/tests.full.xml
tct-bluetooth-tizen-tests/tests.xml

index cb2b1d269c4974537bb9421cf0a258f06b0d1a35..9899e57c29695d5ee2fb7fbe05e26eda647633ef 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_createBonding_errorCallback_invalid_cb
-//==== LABEL Check argument createBonding errorCallback validation.
+//==== LABEL Check argument createBonding() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
@@ -41,33 +41,30 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_createBonding_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, createBondingSuccess, powerOnSuccess, powerOnError;
+    incorrectCallback, createBondingSuccess, powerOnSuccess;
 t.step(function () {
     incorrectCallback = {
-        onsuccess: t.step_func(function (error) {
+        onerror: t.step_func(function (error) {
             assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
         })
     };
 
     createBondingSuccess = t.step_func(function () {
-        assert_unreached("createBondingSuccess shouldn't be here");
+        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);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.createBonding(REMOTE_DEVICE_ADDRESS, createBondingSuccess, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 2ac8dffd018d59d2a03cd8bb4af00ec1dedd3c42..577d346c566f5ca6616fc1fe367b86ef96aa717d 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_createBonding_successCallback_invalid_cb
-//==== LABEL Check argument createBonding successCallback validation.
+//==== LABEL Check argument createBonding() successCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:createBonding M
@@ -41,11 +41,11 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_createBonding_successCallback_invalid_cb",{timeout:90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, createBondingError, powerOnSuccess, powerOnError;
+    incorrectCallback, createBondingError, powerOnSuccess;
 t.step(function () {
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked: ");
+            assert_unreached("Method createBonding shouldn't end successfully.");
         })
     };
 
@@ -56,18 +56,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.createBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, createBondingError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.createBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, createBondingError);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 54d92ad4f32a4fdc20e7325a10522081545759a2..17f29c9367ef8f8ebc48a55e97583e975cec51d1 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_destroyBonding_errorCallback_invalid_cb
-//==== LABEL Check if destroyBonding method throws exception when invalid error callback is given
+//==== 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
@@ -41,8 +41,8 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 var t = async_test("BluetoothAdapter_destroyBonding_errorCallback_invalid_cb", {timeout: 90000}),
-    adapter, exceptionName = "TypeMismatchError", incorrectCallback, destroyBondingError,
-    onBondingSuccess, onBondingError, powerOnSuccess, powerOnError;
+    adapter, exceptionName = "TypeMismatchError", incorrectCallback, destroyBondingSuccess,
+    onBondingSuccess, onBondingError, powerOnSuccess;
 t.step(function () {
 
     incorrectCallback = {
@@ -51,15 +51,15 @@ t.step(function () {
         })
     };
 
-    destroyBondingError = t.step_func(function (e) {
-        assert_unreached("destroyBondingError exception:" + 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, destroyBondingError, incorrectCallback);
-            }, exceptionName + " should be thrown - given incorrect successCallback.");
+                adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, destroyBondingSuccess, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
@@ -71,13 +71,10 @@ t.step(function () {
         adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess,onBondingError);
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 2728ad81ca53c9c46fe11d08a1d25b428b508d0c..d045639aef200f7dc100ac3fccd97fadd923921d 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_destroyBonding_successCallback_invalid_cb
-//==== LABEL Check if destroyBonding method throws exception when invalid success callback is given
+//==== 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
@@ -41,24 +41,24 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 var adapter = null, t = async_test("BluetoothAdapter_destroyBonding_successCallback_invalid_cb",{timeout:90000}), exceptionName = "TypeMismatchError",
-    incorrectCallback, destroyBondingSuccess, onBondingSuccess, onBondingSuccess, onBondingError, powerOnSuccess, powerOnError;
+    incorrectCallback, destroyBondingError, onBondingSuccess, onBondingSuccess, onBondingError, powerOnSuccess;
 t.step(function () {
 
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid succesCallback invoked");
+            assert_unreached("Method destroyBonding shouldn't end successfully.");
         })
     };
 
-    destroyBondingSuccess = t.step_func(function () {
-        assert_unreached("destroyBondingSuccess shouldn't be here");
+    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, destroyBondingSuccess);
-            }, exceptionName + " should be thrown - given incorrect errorCallback.");
+                adapter.destroyBonding(REMOTE_DEVICE_ADDRESS, incorrectCallback, destroyBondingError);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
@@ -70,13 +70,10 @@ t.step(function () {
         adapter.createBonding(REMOTE_DEVICE_ADDRESS, onBondingSuccess,onBondingError);
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 347782cc8f18cb12f2ef32a165bd029c9c35f1c0..d732637d923ea3d05351193e9182c86c57fe90a4 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_discoverDevices_errorCallback_invalid_cb
-//==== LABEL Check argument discoverDevices errorCallback validation.
+//==== LABEL Check argument discoverDevices() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
@@ -44,7 +44,7 @@ var adapter = null,t = async_test("BluetoothAdapter_discoverDevices_errorCallbac
     successCallback, incorrectCallback, stopDiscoverySuccess;
 t.step(function () {
     successCallback =t.step_func( function () {
-        assert_unreached("Should not be here.");
+        assert_unreached("Method discoverDevices shouldn't end successfully.");
     });
 
     incorrectCallback = {
@@ -56,14 +56,15 @@ t.step(function () {
     stopDiscoverySuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.discoverDevices(successCallback, incorrectCallback);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.discoverDevices(successCallback, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
     adapter = tizen.bluetooth.getDefaultAdapter();
     stopDiscovery(t, adapter, stopDiscoverySuccess);
 });
+
 </script>
 </body>
 </html>
index f5297a2ee94695612aa7445deaa416bc52d7a7cf..0b91d087500baad3233631275da56a6f9f6330a3 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_discoverDevices_successCallback_invalid_cb
-//==== LABEL Check discoverDevices argument successCallback validation - use simple function
+//==== LABEL Check discoverDevices() argument successCallback validation - use simple function
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:discoverDevices M
@@ -51,12 +51,12 @@ t.step(function () {
 
     stopDiscoverySuccess = t.step_func(function () {
         for(i = 0; i < incorrectListeners.length; i++) {
-            incorrectCallback  = incorrectListeners[i][0];
+            incorrectCallback = incorrectListeners[i][0];
             exceptionName = incorrectListeners[i][1];
             assert_throws({name : exceptionName},
                 function () {
                     adapter.discoverDevices(incorrectCallback, discoverDevicesError);
-                }, exceptionName + " should be thrown - given incorrect successCallback.");
+                }, "Given incorrect successCallback.");
         }
         t.done();
     });
@@ -64,6 +64,7 @@ t.step(function () {
     adapter = tizen.bluetooth.getDefaultAdapter();
     stopDiscovery(t, adapter, stopDiscoverySuccess);
 });
+
 </script>
 </body>
 </html>
index 2b3ee7105909e0b5726e05753007e69d435c4f8b..f1e058588751ce041ea81dca97fb62cf4fb7c63b 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_getDevice_errorCallback_invalid_cb
-//==== LABEL Check getDevice argument errorCallback validation - use {onerror: function(){}}
+//==== LABEL Check getDevice() argument errorCallback validation - use {onerror: function (){}}
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
@@ -41,33 +41,30 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_getDevice_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, getDeviceSuccess, powerOnSuccess, powerOnError;
+    incorrectCallback, getDeviceSuccess, powerOnSuccess;
 t.step(function () {
     incorrectCallback = {
-        onsuccess: t.step_func(function (e) {
+        onerror: t.step_func(function (e) {
             assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
         })
     };
 
     getDeviceSuccess = t.step_func(function () {
-        assert_unreached("getDeviceSuccess shouldn't be here");
+        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);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.getDevice(REMOTE_DEVICE_ADDRESS, getDeviceSuccess, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index c75cddedc14e608a0660b6b2246fc94cb18e060d..4ab7c5c141d5ddab733dee819ff3d417f2674998 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_getDevice_successCallback_invalid_cb
-//==== LABEL check if successful callback of getDevice method invoked
+//==== LABEL check if successful callback of getDevice() method invoked
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getDevice M
@@ -41,11 +41,11 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_getDevice_successCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, getDeviceError, powerOnSuccess, powerOnError;
+    incorrectCallback, getDeviceError, powerOnSuccess;
 t.step(function () {
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
+            assert_unreached("Method getDevice shouldn't end successfully.");
         })
     };
 
@@ -56,18 +56,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.getDevice(REMOTE_DEVICE_ADDRESS, incorrectCallback, getDeviceError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.getDevice(REMOTE_DEVICE_ADDRESS, incorrectCallback, getDeviceError);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 4cd7a811141962c0eb197803103d4f8ed93a819c..5e7a52018801ae08ef738e6cf501e7e36e961542 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb
-//==== LABEL Check getKnownDevices argument errorCallback validation - use {onerror: function(){}} 
+//==== LABEL Check getKnownDevices() argument errorCallback validation - use {onerror: function (){}} 
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
@@ -41,33 +41,30 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, getKnownDevicesSuccess, powerOnSuccess, powerOnError;
+    incorrectCallback, getKnownDevicesSuccess, powerOnSuccess;
 t.step(function () {
     incorrectCallback = {
-        onsuccess: t.step_func(function (e) {
+        onerror: t.step_func(function (e) {
             assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
         })
     };
 
     getKnownDevicesSuccess = t.step_func(function () {
-        assert_unreached("getKnownDevicesSuccess shouldn't be call:");
+        assert_unreached("Method getKnownDevices shouldn't end successfully.");
     });
 
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.getKnownDevices(getKnownDevicesSuccess, incorrectCallback);
-        },exceptionName + " should be thrown - given incorrect error callback.");
+                adapter.getKnownDevices(getKnownDevicesSuccess, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 392e16f413382c3e903a6c184a51e825938d66bf..f73a0cbe03159588e1ade1f9155749c40bbcaef6 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_getKnownDevices_successCallback_invalid_cb
-//==== LABEL Check getKnownDevices argument successCallback validation - use {onsuccess: function(){}}
+//==== LABEL Check getKnownDevices() argument successCallback validation - use {onsuccess: function (){}}
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:getKnownDevices M
@@ -40,12 +40,12 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 
-var adapter = null,t = async_test("BluetoothAdapter_getKnownDevices_successCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, getKnownDevicesError, powerOnSuccess, powerOnError;
+var adapter = null,t = async_test("BluetoothAdapter_getKnownDevices_successCallback_invalid_cb", {timeout: 90000}),
+    incorrectCallback, getKnownDevicesError, powerOnSuccess,exceptionName = "TypeMismatchError";
 t.step(function () {
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
+            assert_unreached("Method getKnownDevices shouldn't end successfully.");
         })
     };
 
@@ -56,18 +56,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.getKnownDevices(incorrectCallback, getKnownDevicesError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.getKnownDevices(incorrectCallback, getKnownDevicesError);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index a0dbd6a6ede0b1403d996214e8649a07fe32e5a0..47610edb965865d6630610005f4751141fff5e4d 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb
-//==== LABEL Check argument registerRFCOMMServiceByUUID errorCallback validation.
+//==== LABEL Check argument registerRFCOMMServiceByUUID() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
@@ -40,34 +40,31 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 
-var adapter = null,t = async_test("BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, registerRFCOMMServiceByUUIDSuccess, powerOnSuccess, powerOnError;
+var adapter = null,t = async_test("BluetoothAdapter_registerRFCOMMServiceByUUID_errorCallback_invalid_cb", {timeout: 90000}),
+    incorrectCallback, registerRFCOMMServiceByUUIDSuccess, powerOnSuccess,exceptionName = "TypeMismatchError";
 t.step(function () {
     incorrectCallback = {
-        onsuccess: t.step_func(function (e) {
+        onerror: t.step_func(function (e) {
             assert_unreached("Invalid errorCallback invoked: " + e.name + ": " + e.message);
         })
     };
 
     registerRFCOMMServiceByUUIDSuccess = t.step_func(function () {
-        assert_unreached("registerRFCOMMServiceByUUIDSuccess shouldn't be call:");
+        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);
-        },exceptionName + " should be thrown - given incorrect error callback.");
+                adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerRFCOMMServiceByUUIDSuccess, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 2f008c8c0eac54370592b49d96ff452bb194ed34..803fa9170108fa0b5bb5a9f24ef3984cf1c8a433 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb
-//==== LABEL Check argument registerRFCOMMServiceByUUID successCallback validation - use {onsuccess: function(){}}
+//==== LABEL Check argument registerRFCOMMServiceByUUID() successCallback validation - use {onsuccess: function (){}}
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M
@@ -40,12 +40,12 @@ Authors:
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 
-var adapter = null,t = async_test("BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, registerRFCOMMServiceByUUIDError, powerOnSuccess, powerOnError;
+var adapter = null,t = async_test("BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb", {timeout: 90000}),
+    incorrectCallback, registerRFCOMMServiceByUUIDError, powerOnSuccess, exceptionName = "TypeMismatchError";
 t.step(function () {
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked: ");
+            assert_unreached("Method registerRFCOMMServiceByUUID shouldn't end successfully.");
         })
     };
 
@@ -56,18 +56,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", incorrectCallback, registerRFCOMMServiceByUUIDError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", incorrectCallback, registerRFCOMMServiceByUUIDError);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index cbd5927bcac19e81d499da2d000a19a72faf1387..dd35da4f7c052cd1fd872e665608142c51e316d4 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setChangeListener_listener_invalid_cb
-//==== LABEL check setChangeListener with invalid callback
+//==== LABEL check setChangeListener() with invalid callback
 //==== PRIORITY P2
 //==== 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
@@ -48,9 +48,10 @@ test(function () {
         assert_throws({name : exceptionName},
             function () {
                 adapter.setChangeListener(incorrectListener);
-            }, exceptionName + " should be thrown - given incorrect listener.");
+            }, "Given incorrect listener.");
     }
 }, "BluetoothAdapter_setChangeListener_listener_invalid_cb");
+
 </script>
 </body>
 </html>
index 42dac84aa3e1897e1968d1328462aaf73165f9fa..a6e751cfa59904ceff362308034f369a1465de0e 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setName_errorCallback_invalid_cb
-//==== LABEL Check argument setName errorCallback validation.
+//==== LABEL Check argument setName() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
@@ -41,10 +41,10 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_setName_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    powerOnError, powerOnSuccess, incorrectCallback, successCallback;
+    powerOnSuccess, incorrectCallback, successCallback;
 t.step(function () {
     successCallback =t.step_func( function () {
-        assert_unreached("Should not be here.");
+        assert_unreached("Method setName shouldn't end successfully.");
     });
 
     incorrectCallback = {
@@ -56,18 +56,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.setName("myBluetooth", successCallback, incorrectCallback);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.setName("myBluetooth", successCallback, incorrectCallback);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 35c8b66de298b48f3256992520d6cb8db5ddf23a..7080b8f598db26586ca6e3873b71554074719db7 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setName_successCallback_invalid_cb
-//==== LABEL Check argument setName successCallback validation.
+//==== LABEL Check argument setName() successCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setName M
@@ -41,11 +41,11 @@ Authors:
 setup({timeout: 90000});
 
 var adapter = null,t = async_test("BluetoothAdapter_setName_successCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    powerOnError, powerOnSuccess, setNameError, incorrectCallback;
+    powerOnSuccess, setNameError, incorrectCallback;
 t.step(function () {
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
+            assert_unreached("Method setName shouldn't end successfully.");
         })
     };
 
@@ -56,18 +56,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.setName("myBluetooth", incorrectCallback, setNameError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.setName("myBluetooth", incorrectCallback, setNameError);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 25899ee57221d0daa040d5cfb029652952459f23..9b6d682f64feb51920e23da4a3ac833f36d55295 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setPowered_errorCallback_invalid_cb
-//==== LABEL check argument setPowered errorCallback validation.
+//==== LABEL check argument setPowered() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setPowered M
@@ -44,13 +44,13 @@ var adapter = null,t = async_test("BluetoothAdapter_setPowered_errorCallback_inv
     incorrectCallback, powerOnSuccess;
 t.step(function () {
     incorrectCallback = {
-        onsuccess: t.step_func(function (error) {
+        onerror: t.step_func(function (error) {
             assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
         })
     };
 
     powerOnSuccess = t.step_func(function () {
-        assert_unreached("Should't be here");
+        assert_unreached("Method setPowered shouldn't end successfully.");
     });
 
     adapter = tizen.bluetooth.getDefaultAdapter();
@@ -58,9 +58,10 @@ t.step(function () {
     assert_throws({name : exceptionName},
         function () {
             adapter.setPowered(true, powerOnSuccess, incorrectCallback);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+        }, "Given incorrect errorCallback.");
     t.done();
 });
+
 </script>
 </body>
 </html>
index c11e244efa1e74a53d2ec72dfae2c997f963789d..c6fd8655cc24863225bf3ae4c8ddabc36bd1d246 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setPowered_successCallback_invalid_cb
-//==== LABEL check if successful callback of setPowered method invoked
+//==== LABEL check if successful callback of setPowered() method invoked
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setPowered M
@@ -45,7 +45,7 @@ var adapter = null,t = async_test("BluetoothAdapter_setPowered_successCallback_i
 t.step(function () {
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
+            assert_unreached("Method setPowered shouldn't end successfully.");
         })
     };
 
@@ -58,9 +58,10 @@ t.step(function () {
     assert_throws({name : exceptionName},
         function () {
             adapter.setPowered(true, incorrectCallback, powerOnError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+        }, "Given incorrect successCallback.");
     t.done();
 });
+
 </script>
 </body>
 </html>
index 5f16d98b149189e5c3d7ee43417a6e446fe1a68a..96dab49ebd06c4154f78d303352e3dec1e63fec2 100644 (file)
@@ -32,20 +32,20 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setVisible_errorCallback_invalid_cb
-//==== LABEL check if error callback of setVisible method invoked
+//==== LABEL check if error callback of setVisible() method invoked
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setVisible M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/bluetooth.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 
 var t = async_test("BluetoothAdapter_setVisible_errorCallback_invalid_cb", {timeout: 90000});
 t.step(function () {
-    var adapter, exceptionName = "TypeMismatchError", powerOnSuccess, powerOnError, successCallback, incorrectCallback;
+    var adapter, exceptionName = "TypeMismatchError", powerOnSuccess, successCallback, incorrectCallback;
 
     successCallback =t.step_func( function () {
-        assert_unreached("Should not be here.");
+        assert_unreached("Method setVisible shouldn't end successfully.");
     });
 
     incorrectCallback = {
@@ -57,18 +57,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.setVisible(true, successCallback, incorrectCallback, 60);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.setVisible(true, successCallback, incorrectCallback, 60);
+            }, "Given incorrect errorCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 581526724986263a912db49e50532809a7cfd4d2..59b07940bb5cc35fee1bfa2ee2c84343726cb8e3 100644 (file)
@@ -32,21 +32,21 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_setVisible_successCallback_invalid_cb
-//==== LABEL check if successful callback of setVisible method invoked
+//==== LABEL check if successful callback of setVisible() method invoked
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:setVisible M
-//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/bluetooth.html
+//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html
 //==== TEST_CRITERIA MTCB
 setup({timeout: 90000});
 
 var t = async_test("BluetoothAdapter_setVisible_successCallback_invalid_cb", {timeout: 90000});
 t.step(function () {
-    var adapter, exceptionName = "TypeMismatchError", powerOnSuccess, powerOnError, incorrectCallback, setVisibleError;
+    var adapter, exceptionName = "TypeMismatchError", powerOnSuccess, incorrectCallback, setVisibleError;
 
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
+            assert_unreached("Method setVisible shouldn't end successfully.");
         })
     };
 
@@ -57,18 +57,15 @@ t.step(function () {
     powerOnSuccess = t.step_func(function () {
         assert_throws({name : exceptionName},
             function () {
-            adapter.setVisible(true, incorrectCallback, setVisibleError, 60);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                adapter.setVisible(true, incorrectCallback, setVisibleError, 60);
+            }, "Given incorrect successCallback.");
         t.done();
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index cddccdf2179a337b641024683327e1672ba1422c..4a4957676229704fceb072cc40b7ec9b985a17c3 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_stopDiscovery_errorCallback_invalid_cb
-//==== LABEL check stopDiscovery argument errorCallback validation
+//==== LABEL check stopDiscovery() argument errorCallback validation
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
@@ -50,7 +50,7 @@ t.step(function () {
     };
 
     successCallback = t.step_func(function (e) {
-        assert_unreached("errorCallback exception:" + e.message);
+        assert_unreached("Method stopDiscovery shouldn't end successfully.");
     });
 
     stopDiscoverySuccessCB = t.step_func(function () {
@@ -66,8 +66,8 @@ t.step(function () {
             onstarted: function () {
                 assert_throws({name : exceptionName},
                     function () {
-                    adapter.stopDiscovery(successCallback, incorrectCallback);
-                },exceptionName + " should be thrown - given incorrect success callback.");
+                        adapter.stopDiscovery(successCallback, incorrectCallback);
+                    }, "Given incorrect errorCallback.");
                 adapter.stopDiscovery(stopDiscoverySuccessCB);
             },
             ondevicefound: function (device) {
@@ -84,6 +84,7 @@ t.step(function () {
     adapter = tizen.bluetooth.getDefaultAdapter();
     stopDiscovery(t, adapter, stopDiscoverySuccess);
 });
+
 </script>
 </body>
 </html>
index 85ed40c502fa08f8a244c4fe27facf1a88998944..3afb658dc0e8c868e96d2b7251dcd8ad9b6be9b9 100644 (file)
@@ -31,7 +31,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothAdapter_stopDiscovery_successCallback_invalid_cb
-//==== LABEL Check stopDiscovery argument successCallback validation - use {onsuccess: function (){}}
+//==== LABEL Check stopDiscovery() argument successCallback validation - use {onsuccess: function (){}}
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:stopDiscovery M
@@ -45,7 +45,7 @@ t.step(function () {
 
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Shouldn't be here");
+            assert_unreached("Method stopDiscovery shouldn't end successfully.");
         })
     };
 
@@ -66,8 +66,8 @@ t.step(function () {
             onstarted: function () {
                 assert_throws({name : exceptionName},
                     function () {
-                    adapter.stopDiscovery(incorrectCallback, stopDiscoveryError);
-                },exceptionName + " should be thrown - given incorrect success callback.");
+                        adapter.stopDiscovery(incorrectCallback, stopDiscoveryError);
+                    }, "Given incorrect successCallback.");
                 adapter.stopDiscovery(stopDiscoverySuccessCB);
             },
             ondevicefound: function (device) {
@@ -83,6 +83,7 @@ t.step(function () {
     adapter = tizen.bluetooth.getDefaultAdapter();
     stopDiscovery(t, adapter, stopDiscoverySuccess);
 });
+
 </script>
 </body>
 </html>
index 3b17e387d3c84279a5115d5581d0d732e332ca52..25422dce56bedf0ffbdccc6293f0727853fca268 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothHealthApplication_unregister_errorCallback_invalid_cb
-//==== LABEL check argument unregister errorCallback validation.
+//==== LABEL check argument unregister() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothHealthApplication:unregister M
@@ -40,7 +40,7 @@ Authors:
 //==== TEST_CRITERIA MTCB
 
 setup({timeout:90000, explicit_done:true});
-var adapter, healthProfileHandler, powerOnSuccess , powerOnError, healthRegisterSuccess, healthRegisterError,
+var adapter, healthProfileHandler, powerOnSuccess, healthRegisterSuccess, healthRegisterError,
     t = async_test("BluetoothHealthApplication_unregister_errorCallback_invalid_cb", {timeout:90000}), appName = "testSinkApp",
     incorrectCallback, exceptionName = "TypeMismatchError", successCallback;
 
@@ -54,7 +54,7 @@ t.step(function () {
     };
 
     successCallback = t.step_func(function () {
-        assert_unreached("adapter unregister success- Shouldn't be here");
+        assert_unreached("Method unregister shouldn't end successfully.");
     });
 
     healthRegisterSuccess = t.step_func(function (registerHealthApp) {
@@ -62,7 +62,7 @@ t.step(function () {
         assert_throws({name : exceptionName},
             function () {
                 registerHealthApp.unregister(successCallback, incorrectCallback);
-            }, exceptionName + " should be thrown - given incorrect argument.");
+            }, "Given incorrect errorCallback.");
 
         t.done();
     });
@@ -76,12 +76,9 @@ t.step(function () {
         healthProfileHandler.registerSinkApplication(REMOTE_HEALTH_DEVICE_TYPE, appName, healthRegisterSuccess, healthRegisterError);
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 8439711d980ba4f807c8a802b2e08eab7d678311..7b3a718946dd7f6c0c252bd115690842536c6270 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothHealthApplication_unregister_successCallback_invalid_cb
-//==== LABEL check argument unregister successCallback validation.
+//==== LABEL check argument unregister() successCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothHealthApplication:unregister M
@@ -40,7 +40,7 @@ Authors:
 //==== TEST_CRITERIA MTCB
 
 setup({timeout:90000});
-var adapter, healthProfileHandler, powerOnSuccess , powerOnError, healthRegisterSuccess, healthRegisterError,
+var adapter, healthProfileHandler, powerOnSuccess , healthRegisterSuccess, healthRegisterError,
     t = async_test("BluetoothHealthApplication_unregister_successCallback_invalid_cb", {timeout:90000}), appName = "testSinkApp",
     incorrectCallback, exceptionName = "TypeMismatchError";
 
@@ -48,7 +48,7 @@ t.step(function () {
     adapter = tizen.bluetooth.getDefaultAdapter();
 
     incorrectCallback = {
-        onerror: t.step_func(function (error) {
+        onsuccess: t.step_func(function (error) {
             assert_unreached("Invalid successCallback invoked: " + error.name + ": " + error.message);
         })
     };
@@ -57,7 +57,7 @@ t.step(function () {
         assert_throws({name : exceptionName},
             function () {
                 registerHealthApp.unregister(incorrectCallback);
-            }, exceptionName + " should be thrown - given incorrect argument.");
+            }, "Given incorrect successCallback.");
 
         registerHealthApp.unregister();
 
@@ -73,12 +73,9 @@ t.step(function () {
         healthProfileHandler.registerSinkApplication(REMOTE_HEALTH_DEVICE_TYPE, appName, healthRegisterSuccess, healthRegisterError);
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 0fa867401c0e50662d6f8ddffaec4353e4c447a8..0ada755061420797622e57fb1e8375b193b98869 100644 (file)
@@ -30,7 +30,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb
-//==== LABEL Check argument registerSinkApplication errorCallback validation.
+//==== LABEL Check argument registerSinkApplication() errorCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothHealthProfileHandler:registerSinkApplication M
@@ -39,8 +39,8 @@ Authors:
 
 setup({timeout: 90000});
 
-var adapter, t = async_test("BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb", {timeout: 90000}),exceptionName = "TypeMismatchError",
-    incorrectCallback, successCallback, healthProfileHandler;
+var adapter, t = async_test("BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb", {timeout: 90000}),
+    incorrectCallback, successCallback, healthProfileHandler, exceptionName = "TypeMismatchError";
 t.step(function () {
     adapter = tizen.bluetooth.getDefaultAdapter();
     healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
@@ -52,16 +52,17 @@ t.step(function () {
     };
 
     successCallback = t.step_func(function () {
-        assert_unreached("successCallback shouldn't be here");
+        assert_unreached("Method registerSinkApplication shouldn't end successfully.");
     });
 
     assert_throws({name : exceptionName},
         function () {
-        healthProfileHandler.registerSinkApplication(4100, "testSinkApp", successCallback, incorrectCallback);
-    },exceptionName + " should be thrown - given incorrect success callback.");
+            healthProfileHandler.registerSinkApplication(4100, "testSinkApp", successCallback, incorrectCallback);
+        }, "Given incorrect errorCallback.");
 
     t.done();
 });
+
 </script>
 </body>
 </html>
index 33703257d2c8edfa2cbda6bc6ed61bd8c2d73bc7..4f935dc010353ec5191d3d177bc8b85a8023fc82 100644 (file)
@@ -22,7 +22,7 @@ Authors:
 -->
 <html>
 <head>
-<title>BluetoothHealthProfileHandler_registerSinkApplication_errorCallback_invalid_cb</title>
+<title>BluetoothHealthProfileHandler_registerSinkApplication_successCallback_invalid_cb</title>
 <script src="../resources/unitcommon.js"></script>
 </head>
 <body>
@@ -30,7 +30,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothHealthProfileHandler_registerSinkApplication_successCallback_invalid_cb
-//==== LABEL Check argument registerSinkApplication successCallback validation.
+//==== LABEL Check argument registerSinkApplication() successCallback validation.
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothHealthProfileHandler:registerSinkApplication M
@@ -46,22 +46,23 @@ t.step(function () {
     healthProfileHandler = adapter.getBluetoothProfileHandler("HEALTH");
 
     incorrectCallback = {
-        onsuccess: t.step_func(function (error) {
-            assert_unreached("Invalid successCallback invoked: " + error.name + ": " + error.message);
+        onsuccess: t.step_func(function () {
+            assert_unreached("Method registerSinkApplication shouldn't end successfully.");
         })
     };
 
-    errorCallback = t.step_func(function () {
-        assert_unreached("errorCallback shouldn't be here");
+    errorCallback = t.step_func(function (error) {
+        assert_unreached("Invalid errorCallback invoked: " + error.name + ": " + error.message);
     });
 
     assert_throws({name : exceptionName},
         function () {
-        healthProfileHandler.registerSinkApplication(4100, "testSinkApp", incorrectCallback, errorCallback);
-    },exceptionName + " should be thrown - given incorrect success callback.");
+            healthProfileHandler.registerSinkApplication(4100, "testSinkApp", incorrectCallback, errorCallback);
+        }, "Given incorrect successCallback.");
 
     t.done();
 });
+
 </script>
 </body>
 </html>
index d0f416eb04291da04ce4bba4d78f53330744895d..383f93ff66ed6ceb70e413dc4133bc4842354f9a 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothServiceHandler_unregister_errorCallback_invalid_cb
-//==== LABEL check unregister argument errorCallback validation
+//==== LABEL check unregister() argument errorCallback validation
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
@@ -43,7 +43,7 @@ setup({timeout: 90000, explicit_done:true});
 var t = async_test("BluetoothServiceHandler_unregister_errorCallback_invalid_cb", {timeout: 90000});
 t.step(function () {
     var adapter, exceptionName = "TypeMismatchError", incorrectCallback, unregisterSuccess,
-    registerSuccessCB, registerErrorCB, powerOnSuccess, powerOnError;
+    registerSuccessCB, registerErrorCB, powerOnSuccess;
 
     incorrectCallback = {
         onerror: t.step_func(function (error) {
@@ -51,16 +51,16 @@ t.step(function () {
         })
     };
 
-    unregisterSuccess = t.step_func(function (e) {
-        assert_unreached("unregisterSuccess exception:" + e.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);
-        },exceptionName + " should be thrown - given incorrect error callback.");
+                handler.unregister(unregisterSuccess, incorrectCallback);
+            }, "Given incorrect errorCallback.");
 
         t.done();
     });
@@ -73,13 +73,10 @@ t.step(function () {
         adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 2a3dc2ff832dcd46a383d8207f56c5ac82b769c4..9fedcfa0a1eaf2f7859f1b817a874d5971561139 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: BluetoothServiceHandler_unregister_successCallback_invalid_cb
-//==== LABEL check if successful callback of unregister method invoked
+//==== LABEL check if successful callback of unregister() method invoked
 //==== PRIORITY P2
 //==== ONLOAD_DELAY 90
 //==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:unregister M
@@ -43,11 +43,11 @@ setup({timeout:90000, explicit_done:true});
 var t = async_test("BluetoothServiceHandler_unregister_successCallback_invalid_cb", {timeout: 90000});
 t.step(function () {
     var adapter, exceptionName = "TypeMismatchError", incorrectCallback, unregisterError,
-    registerSuccessCB, registerErrorCB, powerOnSuccess, powerOnError;
+    registerSuccessCB, registerErrorCB, powerOnSuccess;
 
     incorrectCallback = {
         onsuccess: t.step_func(function () {
-            assert_unreached("Invalid successCallback invoked");
+            assert_unreached("Method unregister shouldn't end successfully.");
         })
     };
 
@@ -59,8 +59,8 @@ t.step(function () {
         setBluetoothHandlerCleanup(handler);
         assert_throws({name : exceptionName},
             function () {
-            handler.unregister(incorrectCallback, unregisterError);
-        },exceptionName + " should be thrown - given incorrect success callback.");
+                handler.unregister(incorrectCallback, unregisterError);
+            }, "Given incorrect successCallback.");
 
         t.done();
     });
@@ -73,13 +73,10 @@ t.step(function () {
         adapter.registerRFCOMMServiceByUUID(CHAT_SERVICE_UUID, "Chat service", registerSuccessCB, registerErrorCB);
     });
 
-    powerOnError = t.step_func(function (e) {
-        assert_unreached("powerOnError exception:" + e.message);
-    });
-
     adapter = tizen.bluetooth.getDefaultAdapter();
-    adapter.setPowered(true, powerOnSuccess, powerOnError);
+    setPowered(t, adapter, powerOnSuccess);
 });
+
 </script>
 </body>
 </html>
index 24e5b37a9bcbfb6d4dd4f2afd98580f76a11660d..2ea4ada025746c932a5f79dae6c657b2342fd21e 100644 (file)
@@ -32,7 +32,7 @@ Authors:
 <div id="log"></div>
 <script>
 //==== TEST: Bluetooth_discoverDevices_successCallback_invalidcb
-//==== LABEL Check BluetoothDiscoverDevicesSuccessCallback callback with invalid callback
+//==== LABEL Check BluetoothDiscoverDevicesSuccessCallback() callback with invalid callback
 //==== ONLOAD_DELAY 90
 //==== 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
@@ -64,6 +64,7 @@ t.step(function () {
     adapter = tizen.bluetooth.getDefaultAdapter();
     stopDiscovery(t, adapter, stopDiscoverySuccess);
 });
+
 </script>
 </body>
 </html>
index 35366c34cec102610bfc0482bd07ea54ab24facc..46bbdfe56cfe7ebef4c8bdf733ca20e667bb6018 100644 (file)
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check getKnownDevices argument successCallback validation - use {onsuccess: function(){}}" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_getKnownDevices_successCallback_invalid_cb">
+      <testcase purpose="Check getKnownDevices argument successCallback validation - use {onsuccess: function (){}}" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_getKnownDevices_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_successCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check getKnownDevices argument errorCallback validation - use {onerror: function(){}} " type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb">
+      <testcase purpose="Check getKnownDevices argument errorCallback validation - use {onerror: function (){}} " type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check getDevice argument errorCallback validation - use {onerror: function(){}}" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_getDevice_errorCallback_invalid_cb">
+      <testcase purpose="Check getDevice argument errorCallback validation - use {onerror: function (){}}" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_getDevice_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           </spec>
         </specs>
       </testcase>
-      <testcase purpose="Check argument registerRFCOMMServiceByUUID successCallback validation - use {onsuccess: function(){}}" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb">
+      <testcase purpose="Check argument registerRFCOMMServiceByUUID successCallback validation - use {onsuccess: function (){}}" type="compliance" onload_delay="90" status="approved" component="TizenAPI/Communication/Bluetooth" execution_type="auto" priority="P2" id="BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb.html</test_script_entry>
         </description>
         <specs>
           <spec>
             <spec_assertion interface="BluetoothAdapter" element_type="method" element_name="setVisible" specification="Bluetooth" section="Communication" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/bluetooth.html</spec_url>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
         <specs>
           <spec>
             <spec_assertion interface="BluetoothAdapter" element_type="method" element_name="setVisible" specification="Bluetooth" section="Communication" category="Tizen Device API Specifications"/>
-            <spec_url>https://developer.tizen.org/help/topic/org.tizen.help.web.api.device/tizen/bluetooth.html</spec_url>
+            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html</spec_url>
             <spec_statement>TBD</spec_statement>
           </spec>
         </specs>
index 327a104b4027c61514aebf00f16c75cc42797e05..4b9859b54bda80cc4972187a40c4c185f5d55491 100644 (file)
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_errorCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check getKnownDevices argument successCallback validation - use {onsuccess: function(){}}" onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_getKnownDevices_successCallback_invalid_cb">
+      <testcase purpose="Check getKnownDevices argument successCallback validation - use {onsuccess: function (){}}" onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_getKnownDevices_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_successCallback_invalid_cb.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check getKnownDevices argument errorCallback validation - use {onerror: function(){}} " onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb">
+      <testcase purpose="Check getKnownDevices argument errorCallback validation - use {onerror: function (){}} " onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getKnownDevices_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_successCallback_invalid_cb.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check getDevice argument errorCallback validation - use {onerror: function(){}}" onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_getDevice_errorCallback_invalid_cb">
+      <testcase purpose="Check getDevice argument errorCallback validation - use {onerror: function (){}}" onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_getDevice_errorCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_getDevice_errorCallback_invalid_cb.html</test_script_entry>
         </description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_TypeMismatch.html</test_script_entry>
         </description>
       </testcase>
-      <testcase purpose="Check argument registerRFCOMMServiceByUUID successCallback validation - use {onsuccess: function(){}}" onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb">
+      <testcase purpose="Check argument registerRFCOMMServiceByUUID successCallback validation - use {onsuccess: function (){}}" onload_delay="90" component="TizenAPI/Communication/Bluetooth" execution_type="auto" id="BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb">
         <description>
           <test_script_entry>/opt/tct-bluetooth-tizen-tests/bluetooth/BluetoothAdapter_registerRFCOMMServiceByUUID_successCallback_invalid_cb.html</test_script_entry>
         </description>