Index: runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart |
diff --git a/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart b/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart |
index fe51ff709b9772a9a7b85e67f8d740320ef23f21..0571376dc24bb1a97bb66af75c25a7f8b2a3efd7 100644 |
--- a/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart |
+++ b/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart |
@@ -57,6 +57,29 @@ var tests = [ |
} |
expect(caughtException, isTrue); |
}, |
+ |
+ // illegal (dart:_*) library. |
+ (Isolate isolate) async { |
+ await isolate.load(); |
+ Library dartInternal = isolate.libraries.firstWhere( |
+ (Library library) => library.uri == 'dart:_internal'); |
+ var params = { |
+ 'libraryId': dartInternal.id, |
+ 'isDebuggable': false, |
+ }; |
+ bool caughtException; |
+ try { |
+ await isolate.invokeRpcNoUpgrade('setLibraryDebuggable', params); |
+ expect(false, isTrue, reason:'Unreachable'); |
+ } on ServerRpcException catch(e) { |
+ caughtException = true; |
+ expect(e.code, equals(ServerRpcException.kInvalidParams)); |
+ expect(e.message, |
+ "setLibraryDebuggable: " |
+ "illegal 'libraryId' parameter: ${dartInternal.id}"); |
+ } |
+ expect(caughtException, isTrue); |
+ }, |
]; |
main(args) async => runIsolateTests(args, tests); |