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

Unified Diff: runtime/observatory/tests/service/get_retaining_path_rpc_test.dart

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 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
Index: runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
diff --git a/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart b/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
index c27301bf0bff98eee365e77e531ff596e636e1a2..40307be1e946017fced66fd9f7b05373f759574b 100644
--- a/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
@@ -56,8 +56,17 @@ var tests = [
var params = {
'targetId': obj['id'],
};
- var result = await isolate.invokeRpcNoUpgrade('_getRetainingPath', params);
- expect(result['message'], contains("invalid 'limit' parameter"));
+ bool caughtException;
+ try {
+ await isolate.invokeRpcNoUpgrade('_getRetainingPath', params);
+ expect(false, isTrue, reason:'Unreachable');
+ } on ServerRpcException catch (e) {
+ caughtException = true;
+ expect(e.code, equals(ServerRpcException.kInvalidParams));
+ expect(e.data['details'],
+ "_getRetainingPath expects the \'limit\' parameter");
+ }
+ expect(caughtException, isTrue);
},
(Isolate isolate) async {
« no previous file with comments | « runtime/observatory/tests/service/get_object_rpc_test.dart ('k') | runtime/observatory/tests/service/malformed_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698