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

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

Issue 2411153002: Make reloadSources service RPC public (Closed)
Patch Set: turnidge review Created 4 years, 2 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
« no previous file with comments | « runtime/observatory/tests/service/reload_sources_test.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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++) {
« no previous file with comments | « runtime/observatory/tests/service/reload_sources_test.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698