summaryrefslogtreecommitdiff
path: root/android/tester-bluetooth.c
diff options
context:
space:
mode:
authorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>2014-07-03 18:00:18 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-07-14 16:58:38 +0200
commit8cc89fe32bafe9b63a5ddf2eaa969ea1fd2ee70f (patch)
tree0fc30756a71f988082a3bd5c28f0e9ca7c8dcddf /android/tester-bluetooth.c
parent53a3719d05765129bd563788776cd130630c7d82 (diff)
downloadbluez-8cc89fe32bafe9b63a5ddf2eaa969ea1fd2ee70f.tar.gz
android/tester-bluetooth: Add disable success test case
This also adds disable action.
Diffstat (limited to 'android/tester-bluetooth.c')
-rw-r--r--android/tester-bluetooth.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index e89011f5a..8289b8550 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
@@ -108,6 +108,30 @@ static struct test_case bluetooth_enable_success2_tc = {
.step_num = get_test_case_step_num(bluetooth_enable_success2_steps),
};
+static struct step bluetooth_disable_success_steps[] = {
+ {
+ .action_result.status = BT_STATUS_SUCCESS,
+ .action = bluetooth_enable_action,
+ },
+ {
+ .callback = CB_BT_ADAPTER_STATE_CHANGED,
+ .callback_result.state = BT_STATE_ON,
+ },
+ {
+ .action_result.status = BT_STATUS_SUCCESS,
+ .action = bluetooth_disable_action,
+ },
+ {
+ .callback = CB_BT_ADAPTER_STATE_CHANGED,
+ .callback_result.state = BT_STATE_OFF,
+ },
+};
+static struct test_case bluetooth_disable_success_tc = {
+ .step = bluetooth_disable_success_steps,
+ .title = "Bluetooth Disable - Success",
+ .step_num = get_test_case_step_num(bluetooth_disable_success_steps),
+};
+
struct queue *get_bluetooth_tests(void)
{
list = queue_new();
@@ -121,6 +145,9 @@ struct queue *get_bluetooth_tests(void)
if (!queue_push_tail(list, &bluetooth_enable_success2_tc))
return NULL;
+ if (!queue_push_tail(list, &bluetooth_disable_success_tc))
+ return NULL;
+
return list;
}