| // Copyright 2019 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 fuchsia.ui.text.testing; |
| using fuchsia.ui.text; |
| |
| /// This interface runs the standard suite of tests on an implementation of TextField. |
| /// If you maintain a TextField implementation, you should ensure to spin up the |
| /// text_test_suite package and call RunTest in your integration tests. Each call to |
| /// RunTest should contain a fresh TextField handle that points to an empty text field. |
| @discoverable |
| protocol TextFieldTestSuite { |
| RunTest(resource struct { |
| field client_end:fuchsia.ui.text.TextFieldLegacy; |
| test_id uint64; |
| }) -> (struct { |
| passed bool; |
| message string:MAX; |
| }); |
| ListTests() -> (struct { |
| results vector<TestInfo>:MAX; |
| }); |
| }; |
| |
| /// Indicates if the tests passed, and a human-readable message indicating test failures |
| /// if not. |
| type TestInfo = struct { |
| id uint64; |
| name string:MAX; |
| }; |