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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 24542002: Re-enable VM isolate tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months 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
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 4aaabc04b889fd87ccf84ed7d53e4ea803c2b555..e5fce0d01504019172138b5654c16230174db108 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -5745,9 +5745,12 @@ UNIT_TEST_CASE(NewNativePort) {
const char* kScriptChars =
"import 'dart:isolate';\n"
"void callPort(SendPort port) {\n"
- " port.call(null).then((message) {\n"
- " throw new Exception(message);\n"
- " });\n"
+ " var receivePort = new ReceivePort();\n"
+ " port.send(null, receivePort.toSendPort());\n"
+ " receivePort.receive((message, _) {\n"
+ " receivePort.close();\n"
+ " throw new Exception(message);\n"
+ " });\n"
"}\n";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
Dart_EnterScope();
@@ -5809,7 +5812,10 @@ static Dart_Isolate RunLoopTestCallback(const char* script_name,
"\n"
"void main(exc_child, exc_parent) {\n"
" var port = spawnFunction(entry);\n"
- " port.call(exc_child).then((message) {\n"
+ " var receivePort = new ReceivePort();\n"
+ " port.send(exc_child, receivePort.toSendPort());\n"
+ " receivePort.receive((message, _) {\n"
+ " receivePort.close();\n"
" if (message != 'hello') throw new Exception('ShouldNotHappen');\n"
" if (exc_parent) throw new Exception('MakeParentExit');\n"
" });\n"

Powered by Google App Engine
This is Rietveld 408576698