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

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

Issue 2361183002: Respect setLibraryDebuggable (Closed)
Patch Set: Respect setLibraryDebuggable Created 4 years, 3 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/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);

Powered by Google App Engine
This is Rietveld 408576698