//==== EXPECT onconnect is called.\r
//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothAdapter:registerRFCOMMServiceByUUID M\r
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
-//==== PRE tct-bt-helper MUST be launched on the remote device.\r
+//==== PRE tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test, as already bonded devices cannot pass this test.\r
//==== TEST_CRITERIA MOA MAST\r
setup({timeout:180000, explicit_done:true});\r
var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
\r
-->\r
<html>\r
+\r
<head>\r
<title>BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared</title>\r
<script src="support/unitcommon.js"></script>\r
<script src="support/bluetooth_common.js"></script>\r
</head>\r
+\r
<body>\r
\r
<div id="log"></div>\r
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices.\r
//==== TEST_CRITERIA CBT CBOA\r
-setup({timeout: 180000});\r
-var adapter = null, t = async_test(document.title, {timeout: 180000}),\r
+setup({ timeout: 180000 });\r
+var adapter = null, t = async_test(document.title, { timeout: 180000 }),\r
stopDiscoverySuccess, discoverDevicesErrorCB, discoverDevicesSuccessOneCB, discoverDevicesSuccessTwoCB, flag = false;\r
\r
t.step(function () {\r
if (BT_SUPPORT) { // network.bluetooth support\r
- discoverDevicesErrorCB = t.step_func(function (e) {\r
+ discoverDevicesErrorCB = t.step_func(function (e) {\r
assert_unreached("discoverDevicesErrorCB exception:" + e.message);\r
});\r
\r
}),\r
onfinished: t.step_func(function (devices) {\r
if (devices.length > 0) {\r
+ found = false;\r
+ for (var i = 0; i < devices.length; i++) {\r
+ if (devices[i].address === REMOTE_DEVICE_ADDRESS) {\r
+ found = true;\r
+ break;\r
+ }\r
+ }\r
+ if (found === false) {\r
+ assert_unreached("Device not found:" + REMOTE_DEVICE_ADDRESS);\r
+ }\r
+ alert("Please disable bluetooth on the other device, then close this alert");\r
adapter.discoverDevices(discoverDevicesSuccessTwoCB, discoverDevicesErrorCB);\r
- alert("Please disable bluetooth on other device");\r
} else {\r
setTimeout(stopDiscoverySuccess, 1000);\r
}\r
\r
</script>\r
</body>\r
-</html>\r
+\r
+</html>
\ No newline at end of file
//==== EXPECT onconnect is called.\r
//==== SPEC Tizen Web API:Communication:Bluetooth:BluetoothServiceHandler:onconnect A\r
//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/bluetooth.html\r
-//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices. tct-bt-helper MUST be launched on the remote device and turn on.\r
+//==== PRE The bluetooth of the remote/test device MUST be turned on and discoverable from other devices, tct-bt-helper MUST be launched on the remote device and turn on, devices need to be unpaired/unbonded before the test as already bonded devices cannot pass this test.\r
//==== TEST_CRITERIA ASG AE AT ADV\r
setup({timeout:180000, explicit_done:true});\r
var t = async_test(document.title, {timeout: 180000}), adapter, onError, testMessage, registerSuccessCallback,\r
</testcase>
<testcase purpose="Check whether a service record is registered and onconnect is called" type="compliance" status="approved" component="Tizen Device APIs/Communication/Bluetooth" execution_type="manual" priority="P2" id="BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful">
<description>
- <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+ <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test, as already bonded devices cannot pass this test.</pre_condition>
<steps>
<step order="1">
<step_desc>Push [Search] button on the remote device after description is appeared.</step_desc>
</testcase>
<testcase component="Tizen Device APIs/Communication/Bluetooth" type="compliance" status="approved" execution_type="manual" id="BluetoothServiceHandler_onconnect_attribute" priority="P1" purpose="Check whether a service record is registered in the device service record database properly (part 2)">
<description>
- <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+ <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test as already bonded devices cannot pass this test.</pre_condition>
<steps>
<step order="1">
<step_desc>Push [Search] button on the remote device after pop-up is launched.</step_desc>
</testcase>
<testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="manual" id="BluetoothAdapter_registerRFCOMMServiceByUUID_onconnect_successful" priority="P2" purpose="Check whether a service record is registered and onconnect is called">
<description>
- <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+ <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test, as already bonded devices cannot pass this test.</pre_condition>
<steps>
<step order="1">
<step_desc>Push [Search] button on the remote device after description is appeared.</step_desc>
</testcase>
<testcase component="Tizen Device APIs/Communication/Bluetooth" execution_type="manual" id="BluetoothServiceHandler_onconnect_attribute" priority="P1" purpose="Check whether a service record is registered in the device service record database properly (part 2)">
<description>
- <pre_condition>tct-bt-helper MUST be launched on the remote device.</pre_condition>
+ <pre_condition>tct-bt-helper MUST be launched on the remote device, devices need to be unpaired/unbonded before the test as already bonded devices cannot pass this test.</pre_condition>
<steps>
<step order="1">
<step_desc>Push [Search] button on the remote device after pop-up is launched.</step_desc>