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

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..60874a6d69e7de0cb456ebb1d748045078b42263 100644
--- a/runtime/observatory/tests/service/issue_25465_test.dart
+++ b/runtime/observatory/tests/service/issue_25465_test.dart
@@ -6,8 +6,12 @@
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
rmacnak 2016/02/23 18:29:43 A
Cutch 2016/02/23 18:39:42 Done.
foo = 42; // line 12
rmacnak 2016/02/23 18:29:43 B
Cutch 2016/02/23 18:39:42 Done.
@@ -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);

Powered by Google App Engine
This is Rietveld 408576698