| Index: runtime/vm/dart_api_impl_test.cc
|
| ===================================================================
|
| --- runtime/vm/dart_api_impl_test.cc (revision 1518)
|
| +++ runtime/vm/dart_api_impl_test.cc (working copy)
|
| @@ -7,6 +7,7 @@
|
| #include "vm/assert.h"
|
| #include "vm/dart_api_impl.h"
|
| #include "vm/dart_api_state.h"
|
| +#include "vm/port.h"
|
| #include "vm/unit_test.h"
|
| #include "vm/utils.h"
|
| #include "vm/verifier.h"
|
| @@ -788,6 +789,9 @@
|
| EXPECT(NULL == Isolate::Current());
|
| }
|
|
|
| +static void MyCreatePortCallback(Dart_Isolate dest_isolate,
|
| + Dart_Port port) {
|
| +}
|
|
|
| static bool MyPostMessageCallback(Dart_Isolate dest_isolate,
|
| Dart_Port send_port,
|
| @@ -804,8 +808,10 @@
|
|
|
| UNIT_TEST_CASE(SetMessageCallbacks) {
|
| Dart_Isolate dart_isolate = Dart_CreateIsolate(NULL, NULL);
|
| - Dart_SetMessageCallbacks(&MyPostMessageCallback, &MyClosePortCallback);
|
| + Dart_SetMessageCallbacks(
|
| + &MyCreatePortCallback, &MyPostMessageCallback, &MyClosePortCallback);
|
| Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
|
| + EXPECT_EQ(&MyCreatePortCallback, isolate->create_port_callback());
|
| EXPECT_EQ(&MyPostMessageCallback, isolate->post_message_callback());
|
| EXPECT_EQ(&MyClosePortCallback, isolate->close_port_callback());
|
| Dart_ShutdownIsolate();
|
| @@ -2123,6 +2129,8 @@
|
| }
|
| Dart_ShutdownIsolate();
|
| }
|
| +
|
| #endif // TARGET_ARCH_IA32.
|
|
|
| +
|
| } // namespace dart
|
|
|