Index: runtime/observatory/tests/service/service_test_common.dart |
diff --git a/runtime/observatory/tests/service/service_test_common.dart b/runtime/observatory/tests/service/service_test_common.dart |
index 935d42602d60ee92c86dbad35526792738ef18fa..2a68a528c6b3be88ffd91c24c2f284ea7fa2a59e 100644 |
--- a/runtime/observatory/tests/service/service_test_common.dart |
+++ b/runtime/observatory/tests/service/service_test_common.dart |
@@ -144,6 +144,8 @@ bool isEventOfKind(M.Event event, String kind) { |
return event is M.PauseExitEvent; |
case ServiceEvent.kPauseStart: |
return event is M.PauseStartEvent; |
+ case ServiceEvent.kPausePostRequest: |
+ return event is M.PausePostRequestEvent; |
default: |
return false; |
} |
@@ -188,6 +190,10 @@ Future<Isolate> hasStoppedAtBreakpoint(Isolate isolate) { |
return hasPausedFor(isolate, ServiceEvent.kPauseBreakpoint); |
} |
+Future<Isolate> hasStoppedPostRequest(Isolate isolate) { |
+ return hasPausedFor(isolate, ServiceEvent.kPausePostRequest); |
+} |
+ |
Future<Isolate> hasStoppedWithUnhandledException(Isolate isolate) { |
return hasPausedFor(isolate, ServiceEvent.kPauseException); |
} |
@@ -200,6 +206,16 @@ Future<Isolate> hasPausedAtStart(Isolate isolate) { |
return hasPausedFor(isolate, ServiceEvent.kPauseStart); |
} |
+IsolateTest reloadSources([bool pause = false]) { |
+ return (Isolate isolate) async { |
+ Map<String, dynamic> params = <String, dynamic>{ }; |
+ if (pause == true) { |
+ params['pause'] = pause; |
+ } |
+ return isolate.invokeRpc('reloadSources', params); |
+ }; |
+} |
+ |
// Currying is your friend. |
IsolateTest setBreakpointAtLine(int line) { |
return (Isolate isolate) async { |
@@ -333,6 +349,11 @@ Future<Isolate> stepOut(Isolate isolate) async { |
} |
+Future isolateIsRunning(Isolate isolate) async { |
+ await isolate.reload(); |
+ expect(isolate.running, true); |
+} |
+ |
Future<Class> getClassFromRootLib(Isolate isolate, String className) async { |
Library rootLib = await isolate.rootLibrary.load(); |
for (var i = 0; i < rootLib.classes.length; i++) { |