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

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

Issue 1726773002: Refactor service tests in preparation of running on sky_shell (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/step_over_await_test.dart
diff --git a/runtime/observatory/tests/service/step_over_await_test.dart b/runtime/observatory/tests/service/step_over_await_test.dart
index 07a2ac19a10d7450dac04a92d46ce2bff1525d3b..4f57a52db7daf29b698068bb2fa8100b27be0340 100644
--- a/runtime/observatory/tests/service/step_over_await_test.dart
+++ b/runtime/observatory/tests/service/step_over_await_test.dart
@@ -7,19 +7,25 @@ import 'dart:async';
import 'dart:developer';
import 'test_helper.dart';
+import 'service_test_common.dart';
import 'package:observatory/service_io.dart';
import 'package:unittest/unittest.dart';
+const int LINE_A = 24;
+const int LINE_B = 26;
+const int LINE_C = 28;
+const int LINE_D = 29;
+
// This tests the low level synthetic breakpoint added / paused / removed
// machinery triggered by the step OverAwait command.
asyncWithoutAwait() async {
debugger();
- print('a');
+ print('a'); // LINE_A
await new Future.delayed(new Duration(seconds: 2));
- print('b');
- debugger();
- debugger();
+ print('b'); // LINE_B
+ debugger(); // LINE_C
+ debugger(); // LINE_D
}
testMain() {
@@ -125,7 +131,7 @@ Future<Isolate> testLowLevelAwaitOver(
handlePauseBreakpoint(event);
expect(state, 3);
// Check that we are paused after the await statement.
- await (stoppedAtLine(20)(isolate));
+ await (stoppedAtLine(LINE_B)(isolate));
// Resume the isolate so that we trigger the breakpoint removal.
print('!!!! Triggering synthetic breakpoint removal.');
isolate.resume();
@@ -150,7 +156,7 @@ Future<Isolate> testLowLevelAwaitOver(
var tests = [
hasStoppedAtBreakpoint,
- stoppedAtLine(18),
+ stoppedAtLine(LINE_A),
stepOver,
stepOver,
stepOver,
@@ -160,10 +166,10 @@ var tests = [
},
testLowLevelAwaitOver,
hasStoppedAtBreakpoint,
- stoppedAtLine(22),
+ stoppedAtLine(LINE_C),
resumeIsolate,
hasStoppedAtBreakpoint,
- stoppedAtLine(23),
+ stoppedAtLine(LINE_D),
resumeIsolate,
];

Powered by Google App Engine
This is Rietveld 408576698