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

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

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments Created 3 years, 9 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/field_script_test.dart
diff --git a/runtime/observatory/tests/service/field_script_test.dart b/runtime/observatory/tests/service/field_script_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e5e8d4462d7ce55e276497cf832060c9ee13eded
--- /dev/null
+++ b/runtime/observatory/tests/service/field_script_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2017, 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.
+
+library field_script_test;
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+part 'field_script_other.dart';
+
+code() {
+ print(otherField);
+}
+
+var tests = [
+ hasPausedAtStart,
+ (Isolate isolate) async {
+ Library lib = await isolate.rootLibrary.load();
+ var fields = lib.variables;
+ expect(fields.length, 2);
+ print(lib.variables);
+ for(Field f in fields) {
+ await f.load();
+ String locationString = await f.location.toUserString();
+ if (f.name == "tests") {
+ expect(locationString, "field_script_test.dart:18:5");
+ } else if (f.name == "otherField") {
+ expect(locationString, "field_script_other.dart:7:5");
+ } else {
+ fail("Unexpected field: ${f.name}");
+ }
+ }
+ }
+];
+
+main(args) {
+ runIsolateTestsSynchronous(args, tests,
+ testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}

Powered by Google App Engine
This is Rietveld 408576698