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

Side by Side Diff: tests/isolate/error_at_spawnuri_test.dart

Issue 1246823002: Fix build: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/isolate/error_exit_at_spawnuri_test.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 //
5 // OtherScripts=error_at_spawnuri_iso.dart
4 6
5 library error_at_spawnuri; 7 library error_at_spawnuri;
6 8
7 import "dart:isolate"; 9 import "dart:isolate";
8 import "dart:async"; 10 import "dart:async";
9 import "package:async_helper/async_helper.dart"; 11 import "package:async_helper/async_helper.dart";
10 import "package:expect/expect.dart"; 12 import "package:expect/expect.dart";
11 13
12 main(){ 14 main(){
13 asyncStart(); 15 asyncStart();
14 16
15 // Capture errors from other isolate as raw messages. 17 // Capture errors from other isolate as raw messages.
16 RawReceivePort errorPort = new RawReceivePort(); 18 RawReceivePort errorPort = new RawReceivePort();
17 errorPort.handler = (message) { 19 errorPort.handler = (message) {
18 String error = message[0]; 20 String error = message[0];
19 String stack = message[1]; 21 String stack = message[1];
20 Expect.equals(new ArgumentError("fast error").toString(), "$error"); 22 Expect.equals(new ArgumentError("fast error").toString(), "$error");
21 errorPort.close(); 23 errorPort.close();
22 asyncEnd(); 24 asyncEnd();
23 }; 25 };
24 26
25 Isolate.spawnUri(Uri.parse("error_at_spawnuri_iso.dart"), [], 27 Isolate.spawnUri(Uri.parse("error_at_spawnuri_iso.dart"), [],
26 null, 28 null,
27 // Setup handler as part of spawn. 29 // Setup handler as part of spawn.
28 errorsAreFatal: false, 30 errorsAreFatal: false,
29 onError: errorPort.sendPort); 31 onError: errorPort.sendPort);
30 } 32 }
OLDNEW
« no previous file with comments | « no previous file | tests/isolate/error_exit_at_spawnuri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698