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

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

Issue 796063006: Rename Thread -> OSThread. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/dart_api_state.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_debugger_api.h" 7 #include "include/dart_debugger_api.h"
8 #include "include/dart_mirrors_api.h" 8 #include "include/dart_mirrors_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 7321 matching lines...) Expand 10 before | Expand all | Expand 10 after
7332 ASSERT(interrupt_count < kInterruptCount); 7332 ASSERT(interrupt_count < kInterruptCount);
7333 return true; 7333 return true;
7334 } 7334 }
7335 7335
7336 7336
7337 TEST_CASE(IsolateInterrupt) { 7337 TEST_CASE(IsolateInterrupt) {
7338 Dart_IsolateInterruptCallback saved = Isolate::InterruptCallback(); 7338 Dart_IsolateInterruptCallback saved = Isolate::InterruptCallback();
7339 Isolate::SetInterruptCallback(IsolateInterruptTestCallback); 7339 Isolate::SetInterruptCallback(IsolateInterruptTestCallback);
7340 7340
7341 sync = new Monitor(); 7341 sync = new Monitor();
7342 int result = Thread::Start(BusyLoop_start, 0); 7342 int result = OSThread::Start(BusyLoop_start, 0);
7343 EXPECT_EQ(0, result); 7343 EXPECT_EQ(0, result);
7344 7344
7345 { 7345 {
7346 MonitorLocker ml(sync); 7346 MonitorLocker ml(sync);
7347 // Wait for the other isolate to enter main. 7347 // Wait for the other isolate to enter main.
7348 while (!main_entered) { 7348 while (!main_entered) {
7349 ml.Wait(); 7349 ml.Wait();
7350 } 7350 }
7351 } 7351 }
7352 7352
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
8717 NewString("main"), 8717 NewString("main"),
8718 1, 8718 1,
8719 dart_args); 8719 dart_args);
8720 int64_t value = 0; 8720 int64_t value = 0;
8721 result = Dart_IntegerToInt64(result, &value); 8721 result = Dart_IntegerToInt64(result, &value);
8722 EXPECT_VALID(result); 8722 EXPECT_VALID(result);
8723 EXPECT_EQ(6, value); 8723 EXPECT_EQ(6, value);
8724 } 8724 }
8725 8725
8726 } // namespace dart 8726 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/dart_api_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698