summaryrefslogtreecommitdiff
path: root/android/tester-bluetooth.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-07-18 11:50:19 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-07-18 13:21:27 +0200
commitd7be9f5f555c76af8cbc2d49248b629204311fd0 (patch)
tree42be3ff3d9425964699e23725f6469483e579eee /android/tester-bluetooth.c
parent3dd783586c6d69c25193b28143e9007cb677c8c2 (diff)
downloadbluez-d7be9f5f555c76af8cbc2d49248b629204311fd0.tar.gz
android/tester-ng: Add set remote friendly name success case
Diffstat (limited to 'android/tester-bluetooth.c')
-rw-r--r--android/tester-bluetooth.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index 91c5a1a29..480c92ed7 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
@@ -175,9 +175,16 @@ static struct bt_action_data prop_emu_ble_remote_verinfo_req = {
.prop_type = BT_PROPERTY_REMOTE_VERSION_INFO,
};
+static const char prop_test_fname_val[] = "FriendlyTestName";
+static bt_property_t prop_emu_ble_remote_fname_prop = {
+ .type = BT_PROPERTY_REMOTE_FRIENDLY_NAME,
+ .val = &prop_test_fname_val,
+ .len = sizeof(prop_test_fname_val) - 1,
+};
static struct bt_action_data prop_emu_ble_remote_fname_req = {
.addr = &emu_remote_bdaddr_val,
.prop_type = BT_PROPERTY_REMOTE_FRIENDLY_NAME,
+ .prop = &prop_emu_ble_remote_fname_prop,
};
static bt_property_t prop_emu_default_set[] = {
@@ -672,6 +679,22 @@ static struct test_case test_cases[] = {
ACTION_FAIL(bt_get_device_prop_action,
&prop_emu_ble_remote_fname_req),
),
+ TEST_CASE("Bluetooth Device Set FRIENDLY_NAME - Success",
+ ACTION_SUCCESS(bluetooth_enable_action, NULL),
+ CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
+ ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
+ ACTION_SUCCESS(bt_start_discovery_action, NULL),
+ CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
+ BT_DISCOVERY_STARTED),
+ ACTION_SUCCESS(bt_cancel_discovery_action, NULL),
+ CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
+ BT_DISCOVERY_STOPPED),
+ ACTION_SUCCESS(bt_set_device_prop_action,
+ &prop_emu_ble_remote_fname_req),
+ ACTION_SUCCESS(bt_get_device_prop_action,
+ &prop_emu_ble_remote_fname_req),
+ CALLBACK_DEVICE_PROPS(&prop_emu_ble_remote_fname_prop, 1),
+ ),
};
struct queue *get_bluetooth_tests(void)