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

Unified Diff: tests/isolate/isolate3_negative_test.dart

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 5 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
« no previous file with comments | « tests/isolate/isolate2_negative_test.dart ('k') | tests/isolate/isolate_complex_messages_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/isolate3_negative_test.dart
diff --git a/tests/isolate/isolate3_negative_test.dart b/tests/isolate/isolate3_negative_test.dart
index daba708999e063003b938a6e1f7aa1a6851a4f5e..47f599f8de3a134a7e7740100b32175806cb6ecc 100644
--- a/tests/isolate/isolate3_negative_test.dart
+++ b/tests/isolate/isolate3_negative_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -17,15 +17,11 @@ class TestClass {
num fld2;
}
-class Isolate3NegativeTest extends Isolate {
- Isolate3NegativeTest() : super();
-
- void main() {
- this.port.receive((ignored, replyTo) {
- var tmp = new TestClass.named(10);
- replyTo.send(tmp, null);
- });
- }
+void entry() {
+ port.receive((ignored, replyTo) {
+ var tmp = new TestClass.named(10);
+ replyTo.send(tmp, null);
+ });
}
main() {
@@ -33,9 +29,7 @@ main() {
void msg_callback(var message) {
// This test is a negative test and should not complete successfully.
}
- void spawn_callback(SendPort port) {
- port.call("foo").then(expectAsync(msg_callback));
- }
- new Isolate3NegativeTest().spawn().then(expectAsync(spawn_callback));
+ SendPort port = spawnFunction(entry);
+ port.call("foo").then(expectAsync1(msg_callback));
});
}
« no previous file with comments | « tests/isolate/isolate2_negative_test.dart ('k') | tests/isolate/isolate_complex_messages_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698