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

Side by Side Diff: runtime/observatory/test/debugging_test.dart

Issue 977283002: Display call site data for functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/observatory/test/call_site_data_test.dart ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 import 'package:observatory/service_io.dart'; 5 import 'package:observatory/service_io.dart';
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'test_helper.dart'; 7 import 'test_helper.dart';
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 void helper(i) { 10 void helper(i) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 }); 59 });
60 60
61 // Add the breakpoint. 61 // Add the breakpoint.
62 var script = isolate.rootLib.scripts[0]; 62 var script = isolate.rootLib.scripts[0];
63 return isolate.addBreakpoint(script, 18).then((result) { 63 return isolate.addBreakpoint(script, 18).then((result) {
64 expect(result is Breakpoint, isTrue); 64 expect(result is Breakpoint, isTrue);
65 Breakpoint bpt = result; 65 Breakpoint bpt = result;
66 expect(bpt.type, equals('Breakpoint')); 66 expect(bpt.type, equals('Breakpoint'));
67 expect(bpt.script.id, equals(script.id)); 67 expect(bpt.script.id, equals(script.id));
68 expect(bpt.tokenPos, equals(67)); 68 expect(bpt.tokenPos, equals(66));
69 expect(isolate.breakpoints.length, equals(1)); 69 expect(isolate.breakpoints.length, equals(1));
70 return completer.future; // Wait for breakpoint events. 70 return completer.future; // Wait for breakpoint events.
71 }); 71 });
72 }); 72 });
73 }, 73 },
74 74
75 // Get the stack trace 75 // Get the stack trace
76 (Isolate isolate) { 76 (Isolate isolate) {
77 return isolate.getStack().then((ServiceMap stack) { 77 return isolate.getStack().then((ServiceMap stack) {
78 expect(stack.type, equals('Stack')); 78 expect(stack.type, equals('Stack'));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ServiceFunction function = isolate.rootLib.functions.firstWhere( 158 ServiceFunction function = isolate.rootLib.functions.firstWhere(
159 (f) => f.name == 'helper'); 159 (f) => f.name == 'helper');
160 expect(function, isNotNull); 160 expect(function, isNotNull);
161 161
162 // Add the breakpoint at function entry 162 // Add the breakpoint at function entry
163 return isolate.addBreakpointAtEntry(function).then((result) { 163 return isolate.addBreakpointAtEntry(function).then((result) {
164 expect(result is Breakpoint, isTrue); 164 expect(result is Breakpoint, isTrue);
165 Breakpoint bpt = result; 165 Breakpoint bpt = result;
166 expect(bpt.type, equals('Breakpoint')); 166 expect(bpt.type, equals('Breakpoint'));
167 expect(bpt.script.name, equals('debugging_test.dart')); 167 expect(bpt.script.name, equals('debugging_test.dart'));
168 expect(bpt.tokenPos, equals(29)); 168 expect(bpt.tokenPos, equals(28));
169 expect(isolate.breakpoints.length, equals(1)); 169 expect(isolate.breakpoints.length, equals(1));
170 return completer.future; // Wait for breakpoint events. 170 return completer.future; // Wait for breakpoint events.
171 }); 171 });
172 }, 172 },
173 173
174 ]; 174 ];
175 175
176 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); 176 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
OLDNEW
« no previous file with comments | « runtime/observatory/test/call_site_data_test.dart ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698