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

Side by Side Diff: runtime/vm/custom_isolate_test.cc

Issue 1173293007: Fix --verify_handles mode by properly checking for the static API handles. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/dart.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_native_api.h" 6 #include "include/dart_native_api.h"
7 7
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 9
10 // Custom Isolate Test. 10 // Custom Isolate Test.
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 Dart_Handle send_port = Dart_NewSendPort(main_port_id); 305 Dart_Handle send_port = Dart_NewSendPort(main_port_id);
306 EXPECT_VALID(send_port); 306 EXPECT_VALID(send_port);
307 Dart_SetReturnValue(args, send_port); 307 Dart_SetReturnValue(args, send_port);
308 308
309 OS::Print("-- Exit: CustomIsolateImpl_start --\n"); 309 OS::Print("-- Exit: CustomIsolateImpl_start --\n");
310 Dart_ExitScope(); 310 Dart_ExitScope();
311 } 311 }
312 312
313 313
314 UNIT_TEST_CASE(CustomIsolates) { 314 UNIT_TEST_CASE(CustomIsolates) {
315 FLAG_verify_handles = true;
316 FLAG_verify_on_transition = true;
315 event_queue = new EventQueue(); 317 event_queue = new EventQueue();
316 318
317 Dart_Isolate dart_isolate = TestCase::CreateTestIsolate(); 319 Dart_Isolate dart_isolate = TestCase::CreateTestIsolate();
318 EXPECT(dart_isolate != NULL); 320 EXPECT(dart_isolate != NULL);
319 Dart_SetMessageNotifyCallback(&NotifyMessage); 321 Dart_SetMessageNotifyCallback(&NotifyMessage);
320 Dart_EnterScope(); 322 Dart_EnterScope();
321 Dart_Handle result; 323 Dart_Handle result;
322 324
323 // Create a test library. 325 // Create a test library.
324 Dart_Handle lib = TestCase::LoadTestScript(kCustomIsolateScriptChars, 326 Dart_Handle lib = TestCase::LoadTestScript(kCustomIsolateScriptChars,
(...skipping 19 matching lines...) Expand all
344 event = event_queue->Get(); 346 event = event_queue->Get();
345 } 347 }
346 OS::Print("-- Finished event loop --\n"); 348 OS::Print("-- Finished event loop --\n");
347 EXPECT_STREQ("Received: 43", saved_echo); 349 EXPECT_STREQ("Received: 43", saved_echo);
348 free(const_cast<char*>(saved_echo)); 350 free(const_cast<char*>(saved_echo));
349 351
350 delete event_queue; 352 delete event_queue;
351 } 353 }
352 354
353 } // namespace dart 355 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698