blob: 224151d0312514d80a6fc86a073da9c7c3b90109 [file] [log] [blame]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library test.mouse;
using zx;
/// A set of pointer event-related data that is returned to the test for verification.
type PointerData = table {
/// The horizontal coordinate reported in the client's coordinate system.
1: local_x float64;
/// The vertical coordinate reported in the client's coordinate system.
2: local_y float64;
/// The monotonic time (ns) the pointer data was received by the client.
3: time_received zx.time;
// Name of the component to help distinguish responses from multiple components.
4: component_name string:1024;
/// The pressed buttons that were received by the client.
5: buttons int64;
/// The type that the client has reported with the pointer data.
6: type string;
// The scale factor used. On Chrome, the movement exposed to JS has applied this scale.
7: device_scale_factor float64;
};
/// A test-specific scheme to gather signal from the client-under-test.
@discoverable
protocol ResponseListener {
/// Notify the test that client-under-test has received expected input.
Respond(struct {
pointer_data PointerData;
});
/// Notify the test that the WebEngine is ready to process events.
NotifyWebEngineReady();
};