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

Unified Diff: runtime/observatory/tests/service/reload_sources_test.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
Index: runtime/observatory/tests/service/reload_sources_test.dart
diff --git a/runtime/observatory/tests/service/reload_sources_test.dart b/runtime/observatory/tests/service/reload_sources_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4c8b4d975941b8c184b8cc51a3cd5d55501e1e01
--- /dev/null
+++ b/runtime/observatory/tests/service/reload_sources_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--error_on_bad_type --error_on_bad_override
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+import 'dart:developer';
+import 'service_test_common.dart';
+
+testMain() {
+ debugger(); // Stop here.
+ print('1');
+ while (true) {
+ }
+}
+
+var tests = [
+ // Stopped at 'debugger' statement.
+ hasStoppedAtBreakpoint,
+ // Reload sources and request to pause post reload. The pause request will be
+ // ignored because we are already paused at a breakpoint.
+ reloadSources(true),
+ // Ensure that we are still stopped at a breakpoint.
+ hasStoppedAtBreakpoint,
+ // Resume the isolate into the while loop.
+ resumeIsolate,
+ // Reload sources and request to pause post reload. The pause request will
+ // be respected because we are not already paused.
+ reloadSources(true),
+ // Ensure that we are paused post reload request.
+ hasStoppedPostRequest,
+ // Resume the isolate.
+ resumeIsolate,
+ // Verify that it is running.
+ isolateIsRunning,
+ // Reload sources and do not request to pause post reload.
+ reloadSources(false),
+ // Verify that it is running.
+ isolateIsRunning,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/observatory/tests/service/service_test_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698