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

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

Issue 2354773002: Add debugger safe point on assignment to global variables (Closed)
Patch Set: Add regression test 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/issue_27287_test.dart
diff --git a/runtime/observatory/tests/service/issue_27287_test.dart b/runtime/observatory/tests/service/issue_27287_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..58633b3304ec09867b1e8997f9a7b3ec9a8c5603
--- /dev/null
+++ b/runtime/observatory/tests/service/issue_27287_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2016, 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 --verbose_debug
+
+import 'package:observatory/service_io.dart';
+import 'service_test_common.dart';
+import 'dart:async';
+import 'test_helper.dart';
+import 'dart:developer';
+
+const int LINE_A = 19;
+const int LINE_B = 20;
+
+var libVariable;
+
+testMain() {
+ debugger();
+ print("Before"); // LINE_A
+ libVariable = 0; // LINE_B
+ print("and after");
+}
+
+var tests = [
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_A),
+ stepOver,
+ // Check that debugger stops at assignment to top-level variable.
+ stoppedAtLine(LINE_B),
+ resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698