From 3883c4a6a0b16647bc379f62c9b1b70c623d758f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 24 Oct 2014 17:40:11 +0300 Subject: [PATCH] unit/test-avrcp: Add /TP/PTH/BV-02-C test Verify that when a button to send a PASS THROUGH command is held down the CT continues to issue button presses every 2 seconds until the button is released. --- unit/test-avrcp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c index d0b1c367d..bcde2a795 100644 --- a/unit/test-avrcp.c +++ b/unit/test-avrcp.c @@ -1076,6 +1076,9 @@ static void test_client(gconstpointer data) if (g_str_equal(context->data->test_name, "/TP/PTH/BV-01-C")) avrcp_send_passthrough(context->session, 0, AVC_PLAY); + if (g_str_equal(context->data->test_name, "/TP/PTH/BV-02-C")) + avrcp_send_passthrough(context->session, 0, AVC_FAST_FORWARD); + execute_context(context); } @@ -2123,6 +2126,19 @@ int main(int argc, char *argv[]) raw_pdu(0x10, 0x11, 0x0e, 0x00, 0x48, AVC_OP_PASSTHROUGH, AVC_PLAY | 0x80, 0x00)); + define_test("/TP/PTH/BV-02-C", test_client, + raw_pdu(0x00, 0x11, 0x0e, 0x00, 0x48, + AVC_OP_PASSTHROUGH, AVC_FAST_FORWARD, 0x00), + raw_pdu(0x02, 0x11, 0x0e, AVC_CTYPE_ACCEPTED, 0x48, + AVC_OP_PASSTHROUGH, AVC_FAST_FORWARD), + raw_pdu(0x10, 0x11, 0x0e, 0x00, 0x48, + AVC_OP_PASSTHROUGH, AVC_FAST_FORWARD | 0x80, + 0x00), + raw_pdu(0x12, 0x11, 0x0e, AVC_CTYPE_ACCEPTED, 0x48, + AVC_OP_PASSTHROUGH, AVC_FAST_FORWARD | 0x80), + raw_pdu(0x20, 0x11, 0x0e, 0x00, 0x48, + AVC_OP_PASSTHROUGH, AVC_FAST_FORWARD, 0x00)); + /* Request continuing response - TG */ define_test("/TP/RCR/BV-02-C", test_server, raw_pdu(0x00, 0x11, 0x0e, 0x01, 0x48, 0x00, -- 2.47.3