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

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

Issue 1132153002: Add Debugger.inspect. 1976 here we come! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/debugger_inspect_test.dart
diff --git a/runtime/observatory/tests/service/debugger_inspect_test.dart b/runtime/observatory/tests/service/debugger_inspect_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..534595c0cbedaa22006dba539ad0a5710b4776bd
--- /dev/null
+++ b/runtime/observatory/tests/service/debugger_inspect_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2015, 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.
+// VMOptions=--compile-all --error_on_bad_type --error_on_bad_override
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'test_helper.dart';
+import 'dart:async';
+import 'dart:developer';
+
+class Point {
+ int x, y;
+ Point(this.x, this.y);
+}
+
+void testeeDo() {
+ Debugger.inspect(new Point(3, 4));
+}
+
+var tests = [
+
+(Isolate isolate) async {
+ Completer completer = new Completer();
+ var subscription;
+ subscription = isolate.vm.events.stream.listen((ServiceEvent event) {
+ print(event);
+ if (event.eventType == ServiceEvent.kInspect) {
+ expect((event.inspectee as Instance).clazz.name, equals('Point'));
+
+ subscription.cancel();
+ completer.complete();
+ }
+ });
+
+ // Start listening for events first.
+ await isolate.eval(isolate.rootLib, 'testeeDo();');
+ return completer.future;
+},
+
+];
+
+main(args) => runIsolateTests(args, tests);
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698