tests: Add test for keyboard key event timestamps
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Wed, 13 Dec 2017 11:27:57 +0000 (13:27 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 18 Dec 2017 09:46:25 +0000 (11:46 +0200)
commitdae224c6dc8054d1cf3ce4596588f922ff029fd2
tree54f3ec01e75f8318f7769131428054bc45f54b46
parent2180858592bdfa67ed75fb91cde1c18ee17270a2
tests: Add test for keyboard key event timestamps

Add test to verify that the server correctly sets the timestamps of
keyboard key events. This requires updating the weston-test protocol to
support passing key event timestamps.

simple_keyboard_test now uses the create_client_with_keyboard_focus()
helper function which changes the initial state of the surface to be
focused. This leads to one additional iteration of the test loop when
starting, during which the surface is deactivated, i.e., loses focus.
After this initial iteration the test continues as before.

Furthermore, simple_keyboard_test now uses the send_key() helper
function which performs a roundtrip internally. To account for this, the
client_roundtrip() function is now directly called in the loop only when
it is still required, i.e., when deactivating the surface.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
protocol/weston-test.xml
tests/keyboard-test.c
tests/weston-test-client-helper.c
tests/weston-test-client-helper.h
tests/weston-test.c