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

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

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (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 'dart:developer'; 6 import 'dart:developer';
7 import 'package:observatory/service_io.dart'; 7 import 'package:observatory/service_io.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'service_test_common.dart'; 9 import 'service_test_common.dart';
10 import 'test_helper.dart'; 10 import 'test_helper.dart';
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 testeeDo() { 29 testeeDo() {
30 debugger(); 30 debugger();
31 31
32 doAsync(1).then((_) { 32 doAsync(1).then((_) {
33 doAsyncStar(1).listen((_) {}); 33 doAsyncStar(1).listen((_) {});
34 }); 34 });
35 } 35 }
36 36
37
37 checkAsyncVarDescriptors(Isolate isolate) async { 38 checkAsyncVarDescriptors(Isolate isolate) async {
38 ServiceMap stack = await isolate.getStack(); 39 ServiceMap stack = await isolate.getStack();
39 expect(stack.type, equals('Stack')); 40 expect(stack.type, equals('Stack'));
40 expect(stack['frames'].length, greaterThanOrEqualTo(1)); 41 expect(stack['frames'].length, greaterThanOrEqualTo(1));
41 Frame frame = stack['frames'][0]; 42 Frame frame = stack['frames'][0];
42 var vars = frame.variables.map((v) => v['name']).join(' '); 43 var vars = frame.variables.map((v) => v['name']).join(' ');
43 expect(vars, equals('param1 local1')); // no :async_op et al 44 expect(vars, equals('param1 local1')); // no :async_op et al
44 } 45 }
45 46
47
46 checkAsyncStarVarDescriptors(Isolate isolate) async { 48 checkAsyncStarVarDescriptors(Isolate isolate) async {
47 ServiceMap stack = await isolate.getStack(); 49 ServiceMap stack = await isolate.getStack();
48 expect(stack.type, equals('Stack')); 50 expect(stack.type, equals('Stack'));
49 expect(stack['frames'].length, greaterThanOrEqualTo(1)); 51 expect(stack['frames'].length, greaterThanOrEqualTo(1));
50 Frame frame = stack['frames'][0]; 52 Frame frame = stack['frames'][0];
51 var vars = frame.variables.map((v) => v['name']).join(' '); 53 var vars = frame.variables.map((v) => v['name']).join(' ');
52 expect(vars, equals('param2 local2')); // no :async_op et al 54 expect(vars, equals('param2 local2')); // no :async_op et al
53 } 55 }
54 56
57
55 var tests = [ 58 var tests = [
56 hasStoppedAtBreakpoint, // debugger() 59 hasStoppedAtBreakpoint, // debugger()
57 setBreakpointAtLine(LINE_A), 60 setBreakpointAtLine(LINE_A),
58 setBreakpointAtLine(LINE_B), 61 setBreakpointAtLine(LINE_B),
59 resumeIsolate, 62 resumeIsolate,
60 63
61 hasStoppedAtBreakpoint, 64 hasStoppedAtBreakpoint,
62 stoppedAtLine(LINE_A), 65 stoppedAtLine(LINE_A),
63 checkAsyncVarDescriptors, 66 checkAsyncVarDescriptors,
64 resumeIsolate, 67 resumeIsolate,
65 68
66 hasStoppedAtBreakpoint, 69 hasStoppedAtBreakpoint,
67 stoppedAtLine(LINE_B), 70 stoppedAtLine(LINE_B),
68 checkAsyncStarVarDescriptors, 71 checkAsyncStarVarDescriptors,
69 resumeIsolate, 72 resumeIsolate,
70 ]; 73 ];
71 74
72 main(args) => runIsolateTests(args, tests, testeeConcurrent: testeeDo); 75 main(args) => runIsolateTests(args, tests, testeeConcurrent: testeeDo);
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/async_next_test.dart ('k') | runtime/observatory/tests/service/auth_token1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698