| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [DartPackage="_mojo_for_test_only"] | |
| 6 module dart_to_cpp; | |
| 7 | |
| 8 // This struct encompasses all of the basic types, so that they | |
| 9 // may be sent from C++ to Dart and back for validation. | |
| 10 struct EchoArgs { | |
| 11 int64 si64; | |
| 12 int32 si32; | |
| 13 int16 si16; | |
| 14 int8 si8; | |
| 15 uint64 ui64; | |
| 16 uint32 ui32; | |
| 17 uint16 ui16; | |
| 18 uint8 ui8; | |
| 19 float float_val; | |
| 20 float float_inf; | |
| 21 float float_nan; | |
| 22 double double_val; | |
| 23 double double_inf; | |
| 24 double double_nan; | |
| 25 string? name; | |
| 26 array<string>? string_array; | |
| 27 handle<message_pipe>? message_handle; | |
| 28 handle<data_pipe_consumer>? data_handle; | |
| 29 }; | |
| 30 | |
| 31 struct EchoArgsList { | |
| 32 EchoArgsList? next; | |
| 33 EchoArgs? item; | |
| 34 }; | |
| 35 | |
| 36 // Note: For messages which control test flow, pick numbers that are unlikely | |
| 37 // to be hit as a result of our deliberate corruption of response messages. | |
| 38 interface CppSide { | |
| 39 // Sent for all tests to notify that the Dart side is now ready. | |
| 40 StartTest@88888888(); | |
| 41 | |
| 42 // Indicates end for echo, bit-flip, and back-pointer tests. | |
| 43 TestFinished@99999999(); | |
| 44 | |
| 45 // Responses from specific tests. | |
| 46 PingResponse(); | |
| 47 EchoResponse(EchoArgsList list); | |
| 48 }; | |
| 49 | |
| 50 interface DartSide { | |
| 51 SetClient(CppSide cppSide); | |
| 52 Ping(); | |
| 53 Echo(int32 numIterations, EchoArgs arg); | |
| 54 }; | |
| OLD | NEW |