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

Unified Diff: tests/standalone/vmservice/test_helper.dart

Issue 20008002: Attempt to get more data from multiple_isolate_list_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/vmservice/test_helper.dart
diff --git a/tests/standalone/vmservice/test_helper.dart b/tests/standalone/vmservice/test_helper.dart
index 9de301ef02785a4f99f97f688eb3b11c0ef68eef..fed4631ceabf1e8c49c41254bbf3ea97f7662c26 100644
--- a/tests/standalone/vmservice/test_helper.dart
+++ b/tests/standalone/vmservice/test_helper.dart
@@ -48,11 +48,19 @@ abstract class VmServiceRequestHelper {
onRequestFailed(e);
return;
}
- // Received a map.
- Expect.isTrue(reply is Map);
- // Has a 'type' key.
- Expect.isNotNull(reply['type']);
- onRequestCompleted(reply);
+ if (reply is! Map) {
+ onRequestFailed('Reply was not a map: $reply');
+ return;
+ }
+ if (reply['type'] == null) {
+ onRequestFailed('Reply does not contain a type key: $reply');
+ return;
+ }
+ try {
+ onRequestCompleted(reply);
+ } catch(e) {
+ onRequestFailed('Test callback failed: $e');
+ }
}
void onRequestFailed(dynamic error) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698