Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 8588040: Add a mid-sized integration test for the Dart Embedding Api which (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698