summaryrefslogtreecommitdiff
path: root/android/tester-bluetooth.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-07-15 10:24:58 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-07-16 16:40:50 +0200
commit051707adff5e633181f35cb7d2db6c57d942f5fd (patch)
treeb3ef8571e5470d7a1502bd7248d603326594218d /android/tester-bluetooth.c
parentc93ef59d0d5f798422522ac4b6acfd2daff8c825 (diff)
downloadbluez-051707adff5e633181f35cb7d2db6c57d942f5fd.tar.gz
android/tester-ng: Add set scan mode none succes case
Diffstat (limited to 'android/tester-bluetooth.c')
-rw-r--r--android/tester-bluetooth.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index d69134bbc..78a27f7f9 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
@@ -775,6 +775,41 @@ static struct test_case bluetooth_getprop_bonded_devs_success_tc = {
bluetooth_getprop_bonded_devs_success_steps),
};
+static bt_scan_mode_t test_setprop_scanmode_val2 = BT_SCAN_MODE_NONE;
+
+static bt_property_t setprop_scan_mode2_prop = {
+ .type = BT_PROPERTY_ADAPTER_SCAN_MODE,
+ .val = &test_setprop_scanmode_val2,
+ .len = sizeof(test_setprop_scanmode_val2),
+};
+
+static struct step bluetooth_setprop_scan_mode2_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,
+ .set_data = &setprop_scan_mode2_prop,
+ .action = bt_set_property_action,
+ },
+ {
+ .callback = CB_BT_ADAPTER_PROPERTIES,
+ .callback_result.properties = &setprop_scan_mode2_prop,
+ .callback_result.num_properties = 1,
+ }
+};
+static struct test_case bluetooth_setprop_scan_mode2_success_tc = {
+ .step = bluetooth_setprop_scan_mode2_success_steps,
+ .title = "Bluetooth Set SCAN_MODE - Success",
+ .step_num = get_test_case_step_num(
+ bluetooth_setprop_scan_mode2_success_steps),
+};
+
static struct test_case *test_cases[] = {
&bluetooth_init,
&bluetooth_enable_success_tc,
@@ -799,6 +834,7 @@ static struct test_case *test_cases[] = {
&bluetooth_getprop_disc_timeout_success_tc,
&bluetooth_getprop_uuids_success_tc,
&bluetooth_getprop_bonded_devs_success_tc,
+ &bluetooth_setprop_scan_mode2_success_tc,
};
struct queue *get_bluetooth_tests(void)