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

Side by Side Diff: runtime/observatory/tests/service/debugger_inspect_test.dart

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--error_on_bad_type --error_on_bad_override 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'test_helper.dart'; 8 import 'test_helper.dart';
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:developer'; 10 import 'dart:developer';
11 11
12 class Point { 12 class Point {
13 int x, y; 13 int x, y;
14 Point(this.x, this.y); 14 Point(this.x, this.y);
15 } 15 }
16 16
17 void testeeDo() { 17 void testeeDo() {
18 inspect(new Point(3, 4)); 18 inspect(new Point(3, 4));
19 } 19 }
20 20
21 var tests = [ 21 var tests = [
22 (Isolate isolate) async {
23 Completer completer = new Completer();
24 var stream = await isolate.vm.getEventStream(VM.kDebugStream);
25 var subscription;
26 subscription = stream.listen((ServiceEvent event) {
27 if (event.kind == ServiceEvent.kInspect) {
28 expect(event.inspectee.clazz.name, equals('Point'));
29 subscription.cancel();
30 completer.complete();
31 }
32 });
22 33
23 (Isolate isolate) async { 34 // Start listening for events first.
24 Completer completer = new Completer(); 35 await isolate.rootLibrary.evaluate('testeeDo();');
25 var stream = await isolate.vm.getEventStream(VM.kDebugStream); 36 return completer.future;
26 var subscription; 37 },
27 subscription = stream.listen((ServiceEvent event) {
28 if (event.kind == ServiceEvent.kInspect) {
29 expect(event.inspectee.clazz.name, equals('Point'));
30 subscription.cancel();
31 completer.complete();
32 }
33 });
34
35 // Start listening for events first.
36 await isolate.rootLibrary.evaluate('testeeDo();');
37 return completer.future;
38 },
39
40 ]; 38 ];
41 39
42 main(args) => runIsolateTests(args, tests); 40 main(args) => runIsolateTests(args, tests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698