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

Unified Diff: dart/tests/isolate/spawn_uri_missing_test.dart

Issue 306523002: Tweak isolate/spawn_uri_missing*test.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/isolate/spawn_uri_missing_test.dart
diff --git a/dart/tests/isolate/spawn_uri_missing_test.dart b/dart/tests/isolate/spawn_uri_missing_test.dart
index c3dd4d32f4aa2ea316491c2f64aaca24a4d069d3..f342fe216bddae80774a1b77b01a0e23978d857f 100644
--- a/dart/tests/isolate/spawn_uri_missing_test.dart
+++ b/dart/tests/isolate/spawn_uri_missing_test.dart
@@ -12,11 +12,14 @@ import 'dart:async';
import 'package:async_helper/async_helper.dart';
+const UNEXPECTED_MESSAGE = 'Created isolate from missing file.';
+
Future doTest() {
return Isolate.spawnUri(Uri.base.resolve('no_such_file'), [], null)
.then((Isolate isolate) {
- throw 'Created isolate from missing file';
+ throw UNEXPECTED_MESSAGE;
}).catchError((error) {
+ if (error == UNEXPECTED_MESSAGE) throw error;
print('An error was thrown as expected');
return null;
});
Lasse Reichstein Nielsen 2014/05/27 12:09:15 This seem overly complicated. Try this: return
ahe 2014/05/27 13:31:27 We talked about this, and I was surprised that it
« no previous file with comments | « dart/tests/isolate/spawn_uri_missing_from_isolate_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698