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

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

Issue 1527793004: Provide list of service protocol extensions in isolate and emit an event when one is registered (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/developer_extension_test.dart
diff --git a/runtime/observatory/tests/service/developer_extension_test.dart b/runtime/observatory/tests/service/developer_extension_test.dart
index f134606fb66b6bdf0b2ab4dac38d6b785cd4ba9d..1fa04bd263a0fd313642ca4beb8e1646a599caa5 100644
--- a/runtime/observatory/tests/service/developer_extension_test.dart
+++ b/runtime/observatory/tests/service/developer_extension_test.dart
@@ -55,6 +55,7 @@ Future<ServiceExtensionResponse> LanguageErrorHandler(String method,
void test() {
registerExtension('__delay', Handler);
+ debugger();
registerExtension('__error', Handler);
registerExtension('__exception', Handler);
registerExtension('__null', Handler);
@@ -71,6 +72,17 @@ void test() {
}
var tests = [
+ hasStoppedAtBreakpoint,
+ (Isolate isolate) async {
+ await isolate.load();
+ expect(isolate.extensionRPCs.length, 1);
+ expect(isolate.extensionRPCs[0], equals('__delay'));
+ },
+ resumeIsolateAndAwaitEvent(VM.kIsolateStream, (ServiceEvent event) {
+ // Check that we received an event when '__error' was registered.
+ expect(event.kind, equals(ServiceEvent.kServiceExtensionAdded));
+ expect(event.extensionRPC, equals('__error'));
+ }),
// Initial.
(Isolate isolate) async {
var result;
@@ -130,4 +142,4 @@ var tests = [
},
];
-main(args) async => runIsolateTests(args, tests, testeeBefore:test);
+main(args) async => runIsolateTests(args, tests, testeeConcurrent:test);
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698