OLD | NEW |
---|---|
1 module js_to_cpp { | 1 module js_to_cpp { |
2 | 2 |
3 // This struct encompasses all of the basic types, so that they | 3 // This struct encompasses all of the basic types, so that they |
4 // may be sent from C++ to JS and back for validation. | 4 // may be sent from C++ to JS and back for validation. |
5 struct EchoArgs { | 5 struct EchoArgs { |
6 int64 si64; | 6 int64 si64; |
7 int32 si32; | 7 int32 si32; |
8 int16 si16; | 8 int16 si16; |
9 int8 si8; | 9 int8 si8; |
10 uint64 ui64; | 10 uint64 ui64; |
(...skipping 10 matching lines...) Expand all Loading... | |
21 string[] string_array; | 21 string[] string_array; |
22 handle<message_pipe> message_handle; | 22 handle<message_pipe> message_handle; |
23 handle<data_pipe_consumer> data_handle; | 23 handle<data_pipe_consumer> data_handle; |
24 }; | 24 }; |
25 | 25 |
26 struct EchoArgsList { | 26 struct EchoArgsList { |
27 EchoArgsList next; | 27 EchoArgsList next; |
28 EchoArgs item; | 28 EchoArgs item; |
29 }; | 29 }; |
30 | 30 |
31 // Note: For messages which control test flow, pick numbers that are unlikely | |
viettrungluu
2014/05/22 19:24:18
Would it be better to use a completely separate in
| |
32 // to be hit as a result of our deliberate corruption of response messages. | |
31 interface CppSide { | 33 interface CppSide { |
32 StartTest(); // Sent for all tests to notify that the JS side is now ready. | 34 // Sent for all tests to notify that the JS side is now ready. |
33 TestFinished(); // Indicates end for echo, bit-flip, and back-pointer tests. | 35 StartTest @88888888 (); |
viettrungluu
2014/05/22 21:19:12
Style nit: Probably format this as:
StartTest@8
Tom Sepez
2014/05/22 21:22:22
Done.
| |
36 | |
37 // Indicates end for echo, bit-flip, and back-pointer tests. | |
38 TestFinished @99999999 (); | |
viettrungluu
2014/05/22 21:19:12
"
Tom Sepez
2014/05/22 21:22:22
Done.
| |
39 | |
40 // Responses from specific tests. | |
34 PingResponse(); | 41 PingResponse(); |
35 EchoResponse(EchoArgsList list); | 42 EchoResponse(EchoArgsList list); |
36 BitFlipResponse(EchoArgsList arg); | 43 BitFlipResponse(EchoArgsList arg); |
37 BackPointerResponse(EchoArgsList arg); | 44 BackPointerResponse(EchoArgsList arg); |
38 }; | 45 }; |
39 | 46 |
40 [Client=CppSide] | 47 [Client=CppSide] |
41 interface JsSide { | 48 interface JsSide { |
42 Ping(); | 49 Ping(); |
43 Echo(int32 numIterations, EchoArgs arg); | 50 Echo(int32 numIterations, EchoArgs arg); |
44 BitFlip(EchoArgs arg); | 51 BitFlip(EchoArgs arg); |
45 BackPointer(EchoArgs arg); | 52 BackPointer(EchoArgs arg); |
46 }; | 53 }; |
47 | 54 |
48 } | 55 } |
OLD | NEW |