fuchsia.ui.test.input

Added: 9

PROTOCOLS

Keyboard

Defined in fuchsia.ui.test.input/text.fidl

A tool to inject keyboard events into Input Pipeline.

Please extend as necessary.

SimulateKeyEvent

Simulate a key event by a keyboard input report.

KeyboardInputReport includes a list of keys that are currently pressing down. The report can represent key down / up by comparing with previous reports received.

Added: 16

Request

NameType
payload KeyboardSimulateKeyEventRequest

Response

<EMPTY>

SimulateUsAsciiTextEntry

Simulates input of the set of keystrokes required to type text, as if on a US QWERTY keyboard.

US ASCII text get mapped to the corresponding key presses. For example a gets mapped into a press and a followup release of the key a on the US QWERTY keyboard. Also, A gets mapped into a press of the Shift key, followed by a press and release of a.

For convenience, the \n and \t get converted into Enter and Tab keys respectively.

Request

NameType
payload KeyboardSimulateUsAsciiTextEntryRequest

Response

<EMPTY>

KeyboardInputListener

Defined in fuchsia.ui.test.input/text.fidl

A tool for client applications to report text input to interested parties (e.g. a test fixture).

NOTE: The reporter is the client of this service.

Canonical usage is for a test to inject text via fuchsia.ui.test.input.Keyboad, and wait for the client under test to report back that it received the injected text via fuchsia.ui.test.input.KeyboardInputListener.

NOTE: This protocol is implemented by OOT code. Use versioning to make changes to this protocol.

ReportReady

Notify that the client is ready to receive text input. Clients that need to complete their setup to be able to continue with testing should call this method, so that the listener can wait until they are ready to proceed with testing.

Deprecated: 23

Request

<EMPTY>

Response

<EMPTY>

ReportTextInput

Notify the listener of the text string generated by the set of key events received by the application.

Request

NameType
payload KeyboardInputListenerReportTextInputRequest

MediaButtonsDevice

Defined in fuchsia.ui.test.input/media_buttons.fidl

A tool to inject media button events into Input Pipeline.

Please extend as necessary.

SendButtonsState

Send a vector of pressing button on the requested button on the device. Passing empty vector will release all pressing buttons.

Added: 19

Request

NameType
payload MediaButtonsDeviceSendButtonsStateRequest

Response

<EMPTY>

SimulateButtonPress

Simulates a button press and release on the requested button on the device.

Request

NameType
payload MediaButtonsDeviceSimulateButtonPressRequest

Response

<EMPTY>

Mouse

Defined in fuchsia.ui.test.input/mouse.fidl

A tool to inject mouse events into Input Pipeline.

Please extend as necessary.

SimulateMouseEvent

Injects an input report corresponding to the event specified.

NOTE: the movement parameters have a range of [-1000, 1000], and the scroll parameters have a range of [-100, 100].

Request

NameType
payload MouseSimulateMouseEventRequest

Response

<EMPTY>

MouseInputListener

Defined in fuchsia.ui.test.input/mouse.fidl

A tool for applications to report touch input to interested parties (e.g. a test fixture).

ReportMouseInput

Report that component under test has received expected input.

Request

NameType
payload MouseInputListenerReportMouseInputRequest

Registry

Defined in fuchsia.ui.test.input/registry.fidl

*** This protocol must not be used in production. ***

Enables clients to register fake input devices, which can be used to inject input events directly into Input Pipeline.

RegisterKeyboard

Enables the client to inject keyboard events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.Keyboard channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterKeyboardRequest

Response

<EMPTY>

RegisterKeyboardAndGetDeviceInfo

Enables the client to inject keyboard events using the corresponding client end to device. Returns device_id of the created device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.Keyboard channel will remain open even if the Registry connection closes.

Added: 24

Request

NameType
payload RegistryRegisterKeyboardAndGetDeviceInfoRequest

Response

NameType
payload RegistryRegisterKeyboardAndGetDeviceInfoResponse

RegisterMediaButtonsDevice

Enables the client to inject media buttons events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.MediaButtonsDevice channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterMediaButtonsDeviceRequest

Response

<EMPTY>

RegisterMediaButtonsDeviceAndGetDeviceInfo

Enables the client to inject media buttons events using the corresponding client end to device. Returns device_id of the created device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.MediaButtonsDevice channel will remain open even if the Registry connection closes.

Added: 24

Request

NameType
payload RegistryRegisterMediaButtonsDeviceAndGetDeviceInfoRequest

Response

NameType
payload RegistryRegisterMediaButtonsDeviceAndGetDeviceInfoResponse

RegisterMouse

Enables the client to inject mouse events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.Mouse channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterMouseRequest

Response

<EMPTY>

RegisterMouseAndGetDeviceInfo

Enables the client to inject mouse events using the corresponding client end to device. Returns device_id of the created device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.Mouse channel will remain open even if the Registry connection closes.

Added: 24

Request

NameType
payload RegistryRegisterMouseAndGetDeviceInfoRequest

Response

NameType
payload RegistryRegisterMouseAndGetDeviceInfoResponse

RegisterTouchScreen

Enables the client to inject touch events using the corresponding client end to device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.TouchScreen channel will remain open even if the Registry connection closes.

Request

NameType
payload RegistryRegisterTouchScreenRequest

Response

<EMPTY>

RegisterTouchScreenAndGetDeviceInfo

Enables the client to inject touch events using the corresponding client end to device. Returns device_id of the created device.

Clients are allowed at most one in-flight call at a time. Subsequent calls must wait until the acknowledgment returns. Non-compliance results in channel closure.

The fuchsia.ui.test.input.TouchScreen channel will remain open even if the Registry connection closes.

Added: 24

Request

NameType
payload RegistryRegisterTouchScreenAndGetDeviceInfoRequest

Response

NameType
payload RegistryRegisterTouchScreenAndGetDeviceInfoResponse

TestAppStatusListener

Defined in fuchsia.ui.test.input/test_app.fidl

Test suites depend on test app status can listen to this listener.

Added: 23

ReportStatus

Notify that the test app is ready to receive input events.

Test app authors should call this method when they are ready to process input events.

Test suites should wait for this call before injecting input events.

Request

NameType
status TestAppStatus

Response

<EMPTY>

TouchInputListener

Defined in fuchsia.ui.test.input/touch.fidl

A tool for applications to report touch input to interested parties (e.g. a test fixture).

ReportTouchInput

Report that component under test has received expected input.

Request

NameType
payload TouchInputListenerReportTouchInputRequest

TouchScreen

Defined in fuchsia.ui.test.input/touch.fidl

A tool to inject touch events into Input Pipeline.

Please extend as necessary.

SimulateMultiFingerGesture

Simulates a multi fingers linear gesture that starts at start_locations and ends at end_locations, with a total number of move events equal to move_event_count. if the arguments are invalid, the server should close the connection.

The generated pointer event stream will be:

DOWN + CHANGE_1 + ... + CHANGE_n + UP, where n == move_event_count

Events are injected with a small explicit delay in between.

Added: 12

Request

NameType
payload TouchScreenSimulateMultiFingerGestureRequest

Response

<EMPTY>

SimulateMultiTap

Simulates multi finger tap at the requested locations.

Added: 12

Request

NameType
payload TouchScreenSimulateMultiTapRequest

Response

<EMPTY>

SimulateSwipe

Simulates a swipe that starts at start_location and ends at end_location, with a total number of move events equal to move_event_count.

The generated pointer event stream will be:

DOWN + CHANGE_1 + ... + CHANGE_n + UP, where n == move_event_count

Events are injected with no explicit delay in between; in other words, the observed delay between successive events will be approximately equal to the time required to inject a single event.

Request

NameType
payload TouchScreenSimulateSwipeRequest

Response

<EMPTY>

SimulateTap

Simulates a tap at the requested location.

Request

NameType
payload TouchScreenSimulateTapRequest

Response

<EMPTY>

SimulateTouchEvent

Simulate a touch event by a touch input report.

TouchInputReport includes a list of contacts that are currently contacting the touch surface. The report can represent multiply touch events by comparing with previous reports received.

Added: 17

Request

NameType
report fuchsia.input.report/TouchInputReport

Response

<EMPTY>

ENUMS

CoordinateUnit flexible

Type: uint32

Defined in fuchsia.ui.test.input/registry.fidl

Indicates the units used to specify spatial event parameters (unless otherwise noted).

Added: 11

NameValueDescription
0

The physical display is mapped to a coordinate space spanning [-1000, 1000] on both the x and y axes, where positive x extends rightward and positive y extends downward.

Example: (500, -500) in the default coordinate space maps to the center of the top-right quadrant of the physical display.

1

The physical display is mapped to a coordinate space spanning (0, 0) - (dispaly width, display height), where positive x extends rightward and positive y extends downward.

Test writers should use fuchsia.ui.display.singleton.Info to retrieve the physical dimensions of the display.

Note that this space matches both the size AND orientation of the physical display, so it will NOT mirror any rotations applied to the scene graph.

In general, test writers should NOT assume that a particular view's logical coordinate space matches the physical coordinate space.

MouseButton flexible

Type: uint32

Defined in fuchsia.ui.test.input/mouse.fidl

Identifies various buttons on a standard mouse.

NameValueDescription
0

"Left" mouse button.

1

"Right" mouse button.

2

"Third" mouse button.

MouseEventPhase flexible

Type: uint32

Defined in fuchsia.ui.test.input/mouse.fidl

Identifies the phase of a mouse event.

NameValueDescription
0

The observer has started tracking the mouse.

1

The mouse has moved since the last ADD event, without an interceding DOWN event.

2

One or more mouse buttons have been pressed.

3

The mouse has moved since the last DOWN event.

4

All pressed buttons have been released.

5

The mouse wheel was manipulated.

TestAppStatus flexible

Type: uint16

Defined in fuchsia.ui.test.input/test_app.fidl

Added: 23

NameValueDescription
1

Must of input tests (mouse / touch) only require HANDLERS_REGISTERED. HANDLERS_REGISTERED means test app has started and event handlers are registered.

2

Keyboard related tests may require ELEMENT_FOCUSED status before inject key events. For example Chromium related tests, event handler is registered to a