From: Witold Choinkowski Date: Wed, 25 Sep 2013 15:49:47 +0000 (+0200) Subject: [Bluetooth] ondevicedisappeared X-Git-Tag: 2.2.1_release~118^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d343cd0149cffaeb99d0bfb1d99fb8d689b3140;p=test%2Ftct%2Fweb%2Fapi.git [Bluetooth] ondevicedisappeared Change-Id: Ic20ff9ae5683cdbc24375933372dbc25d4d380f4 --- diff --git a/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared.html b/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared.html index 70e174f27..526314f9c 100644 --- a/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared.html +++ b/tct-bluetooth-tizen-tests/bluetooth/BluetoothDiscoverDevicesSuccessCallback_ondevicedisappeared.html @@ -57,11 +57,15 @@ t.step(function () { }), ondevicedisappeared: t.step_func(function (address) { assert_type(address, "string", "address has wrong type"); - flag = true; + if(address === REMOTE_DEVICE_ADDRESS) + flag = true; }), onfinished: t.step_func(function (devices) { - assert_true(flag, "Device not dissapeared"); - t.done(); + if(flag) { + t.done(); + } else { + adapter.discoverDevices(discoverDevicesSuccessTwoCB,discoverDevicesErrorCB); + } }) }; @@ -74,10 +78,8 @@ t.step(function () { }), onfinished: t.step_func(function (devices) { if (devices.length !== 0 ){ + adapter.discoverDevices(discoverDevicesSuccessTwoCB,discoverDevicesErrorCB); alert("Please disable bluetooth on other device"); - setTimeout(function (){ - adapter.discoverDevices(discoverDevicesSuccessTwoCB,discoverDevicesErrorCB); - },5000); } else { assert_unreached("No devices was found"); }