summaryrefslogtreecommitdiff
path: root/android/tester-bluetooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'android/tester-bluetooth.c')
-rw-r--r--android/tester-bluetooth.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index 8289b8550..f071910cc 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
@@ -132,6 +132,40 @@ static struct test_case bluetooth_disable_success_tc = {
.step_num = get_test_case_step_num(bluetooth_disable_success_steps),
};
+static char test_set_bdname[] = "test_bdname_set";
+
+static bt_property_t setprop_bdname_prop = {
+ .type = BT_PROPERTY_BDNAME,
+ .val = test_set_bdname,
+ .len = sizeof(test_set_bdname) - 1,
+};
+
+static struct step bluetooth_setprop_bdname_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_bdname_prop,
+ .action = bt_set_property_action,
+ },
+ {
+ .callback = CB_BT_ADAPTER_PROPERTIES,
+ .callback_result.properties = &setprop_bdname_prop,
+ }
+};
+static struct test_case bluetooth_setprop_bdname_success_tc = {
+ .step = bluetooth_setprop_bdname_success_steps,
+ .title = "Bluetooth Set BDNAME - Success",
+ .step_num =
+ get_test_case_step_num(bluetooth_setprop_bdname_success_steps),
+};
+
struct queue *get_bluetooth_tests(void)
{
list = queue_new();
@@ -148,6 +182,9 @@ struct queue *get_bluetooth_tests(void)
if (!queue_push_tail(list, &bluetooth_disable_success_tc))
return NULL;
+ if (!queue_push_tail(list, &bluetooth_setprop_bdname_success_tc))
+ return NULL;
+
return list;
}