| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO(zra): Remove when tests are ready to enable. | 5 // TODO(zra): Remove when tests are ready to enable. |
| 6 #include "platform/globals.h" | 6 #include "platform/globals.h" |
| 7 #if !defined(TARGET_ARCH_ARM64) | 7 #if !defined(TARGET_ARCH_ARM64) |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_native_api.h" | 10 #include "include/dart_native_api.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // Reload all the test classes here. | 286 // Reload all the test classes here. |
| 287 // | 287 // |
| 288 // TODO(turnidge): Use the create isolate callback instead? | 288 // TODO(turnidge): Use the create isolate callback instead? |
| 289 Dart_Handle lib = TestCase::LoadTestScript(kCustomIsolateScriptChars, | 289 Dart_Handle lib = TestCase::LoadTestScript(kCustomIsolateScriptChars, |
| 290 NativeLookup); | 290 NativeLookup); |
| 291 EXPECT_VALID(lib); | 291 EXPECT_VALID(lib); |
| 292 | 292 |
| 293 Dart_Handle main_port = Dart_GetField(lib, NewString("mainPort")); | 293 Dart_Handle main_port = Dart_GetField(lib, NewString("mainPort")); |
| 294 EXPECT_VALID(main_port); | 294 EXPECT_VALID(main_port); |
| 295 Dart_Port main_port_id; | 295 Dart_Port main_port_id; |
| 296 Dart_Handle err = Dart_PortGetId(main_port, &main_port_id); | 296 Dart_Handle err = Dart_ReceivePortGetId(main_port, &main_port_id); |
| 297 EXPECT_VALID(err); | 297 EXPECT_VALID(err); |
| 298 | 298 |
| 299 OS::Print("-- Adding StartEvent to queue --\n"); | 299 OS::Print("-- Adding StartEvent to queue --\n"); |
| 300 event_queue->Add(new StartEvent(new_isolate, isolate_main)); | 300 event_queue->Add(new StartEvent(new_isolate, isolate_main)); |
| 301 | 301 |
| 302 // Restore the original isolate. | 302 // Restore the original isolate. |
| 303 Dart_ExitScope(); | 303 Dart_ExitScope(); |
| 304 Dart_ExitIsolate(); | 304 Dart_ExitIsolate(); |
| 305 Dart_EnterIsolate(saved_isolate); | 305 Dart_EnterIsolate(saved_isolate); |
| 306 Dart_EnterScope(); | 306 Dart_EnterScope(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 OS::Print("-- Finished event loop --\n"); | 349 OS::Print("-- Finished event loop --\n"); |
| 350 EXPECT_STREQ("Received: 43", saved_echo); | 350 EXPECT_STREQ("Received: 43", saved_echo); |
| 351 free(const_cast<char*>(saved_echo)); | 351 free(const_cast<char*>(saved_echo)); |
| 352 | 352 |
| 353 delete event_queue; | 353 delete event_queue; |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace dart | 356 } // namespace dart |
| 357 | 357 |
| 358 #endif // !defined(TARGET_ARCH_ARM64) | 358 #endif // !defined(TARGET_ARCH_ARM64) |
| OLD | NEW |