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

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

Issue 2366463002: Fix stepping over await statements (Closed)
Patch Set: Merge branch 'master' into deb 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/observatory/tests/service/service_test_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/issue_27238_test.dart
diff --git a/runtime/observatory/tests/service/async_next_test.dart b/runtime/observatory/tests/service/issue_27238_test.dart
similarity index 55%
copy from runtime/observatory/tests/service/async_next_test.dart
copy to runtime/observatory/tests/service/issue_27238_test.dart
index 4fefcca786308aafde726c30d981abdb9c819b6b..052b107e454722669085e341f146ee072218aa6c 100644
--- a/runtime/observatory/tests/service/async_next_test.dart
+++ b/runtime/observatory/tests/service/issue_27238_test.dart
@@ -5,46 +5,41 @@
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;
-const int LINE_C = 21;
+const int LINE_A = 20;
+const int LINE_B = 23;
+const int LINE_C = 24;
+const int LINE_D = 26;
+const int LINE_E = 27;
-foo() async { }
+testMain() async {
+ debugger();
+ Future future1 = new Future.value(); // LINE_A.
+ Future future2 = new Future.value();
-doAsync(stop) async {
- if (stop) debugger();
- await foo(); // Line A.
- await foo(); // Line B.
- await foo(); // Line C.
- return null;
-}
-
-testMain() {
- // With two runs of doAsync floating around, async step should only cause
- // us to stop in the run we started in.
- doAsync(false);
- doAsync(true);
-}
+ await future1; // LINE_B.
+ await future2; // LINE_C.
-asyncNext(Isolate isolate) async {
- print('asyncNext');
- return asyncStepOver(isolate);
+ print('foo1'); // LINE_D.
+ print('foo2'); // LINE_E.
}
var tests = [
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
- stepOver, // foo()
- asyncNext,
+ smartNext,
hasStoppedAtBreakpoint,
+ smartNext,
stoppedAtLine(LINE_B),
- stepOver, // foo()
- asyncNext,
+ smartNext,
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_C),
+ smartNext,
+ hasStoppedAtBreakpoint,
+ stoppedAtLine(LINE_D),
resumeIsolate,
];
« no previous file with comments | « no previous file | runtime/observatory/tests/service/service_test_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698