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

Unified Diff: runtime/observatory/tests/service/issue_25465_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/issue_25465_test.dart
diff --git a/runtime/observatory/tests/service/issue_25465_test.dart b/runtime/observatory/tests/service/issue_25465_test.dart
index 3a739f0d5fc67ab1621a3cd0cd7d4692dfb60704..21f91bda7bc6653b7e6f46f3c1949ea412c9a154 100644
--- a/runtime/observatory/tests/service/issue_25465_test.dart
+++ b/runtime/observatory/tests/service/issue_25465_test.dart
@@ -6,11 +6,15 @@
import 'package:observatory/service_io.dart';
import 'package:unittest/unittest.dart';
import 'test_helper.dart';
+import 'service_test_common.dart';
import 'dart:async';
+const int LINE_A = 16;
+const int LINE_B = 17;
+
testMain() {
- var foo; // line 11
- foo = 42; // line 12
+ var foo; // line A
+ foo = 42; // line B
print(foo);
}
@@ -23,10 +27,10 @@ var tests = [
await rootLib.load();
var script = rootLib.scripts[0];
- var bpt1 = await isolate.addBreakpoint(script, 11);
- var bpt2 = await isolate.addBreakpoint(script, 12);
- expect(await bpt1.location.getLine(), equals(11));
- expect(await bpt2.location.getLine(), equals(12));
+ var bpt1 = await isolate.addBreakpoint(script, LINE_A);
+ var bpt2 = await isolate.addBreakpoint(script, LINE_B);
+ expect(await bpt1.location.getLine(), equals(LINE_A));
+ expect(await bpt2.location.getLine(), equals(LINE_B));
var stream = await isolate.vm.getEventStream(VM.kDebugStream);
Completer completer = new Completer();
@@ -52,9 +56,9 @@ var tests = [
// No breakpoint.
expect(event.breakpoint, isNull);
- // We expect the next step to take us to line 12.
+ // We expect the next step to take us to line B.
var stack = await isolate.getStack();
- expect(await stack['frames'][0].location.getLine(), equals(12));
+ expect(await stack['frames'][0].location.getLine(), equals(LINE_B));
subscription.cancel();
completer.complete(null);
« no previous file with comments | « runtime/observatory/tests/service/isolate_lifecycle_test.dart ('k') | runtime/observatory/tests/service/logging_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698