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

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

Issue 2695013003: Mark dart: libraries as not debuggable (by default) (Closed)
Patch Set: hausner review Created 3 years, 10 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
« no previous file with comments | « no previous file | runtime/observatory/tests/service/regress_28443_test.dart » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 --verbose_debug 4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
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';
11 11
12 helper() async { // Line 12, Col 16 is the open brace. 12 helper() async { // Line 12, Col 16 is the open brace.
13 } 13 }
14 14
15 testMain() { 15 testMain() {
16 debugger(); 16 debugger();
17 helper(); // Line 17, Col 3 is the position of the function call. 17 helper(); // Line 17, Col 3 is the position of the function call.
18 } 18 }
19 19
20 var tests = [ 20 var tests = [
21 hasStoppedAtBreakpoint, 21 hasStoppedAtBreakpoint,
22 markDartColonLibrariesDebuggable,
22 stoppedAtLine(17), 23 stoppedAtLine(17),
23 stepInto, 24 stepInto,
24 25
25 (Isolate isolate) async { 26 (Isolate isolate) async {
26 ServiceMap stack = await isolate.getStack(); 27 ServiceMap stack = await isolate.getStack();
27 expect(stack['frames'].length, greaterThan(3)); 28 expect(stack['frames'].length, greaterThan(3));
28 29
29 var frame = stack['frames'][0]; 30 var frame = stack['frames'][0];
30 expect(frame.function.name, equals('Completer.sync')); 31 expect(frame.function.name, equals('Completer.sync'));
31 expect(await frame.location.getLine(), greaterThan(0)); 32 expect(await frame.location.getLine(), greaterThan(0));
32 expect(await frame.location.getColumn(), greaterThan(0)); 33 expect(await frame.location.getColumn(), greaterThan(0));
33 34
34 // We used to return a negative token position for this frame. 35 // We used to return a negative token position for this frame.
35 // See issue #27128. 36 // See issue #27128.
36 frame = stack['frames'][1]; 37 frame = stack['frames'][1];
37 expect(frame.function.name, equals('helper')); 38 expect(frame.function.name, equals('helper'));
38 expect(await frame.location.getLine(), equals(12)); 39 expect(await frame.location.getLine(), equals(12));
39 expect(await frame.location.getColumn(), equals(16)); 40 expect(await frame.location.getColumn(), equals(16));
40 41
41 frame = stack['frames'][2]; 42 frame = stack['frames'][2];
42 expect(frame.function.name, equals('testMain')); 43 expect(frame.function.name, equals('testMain'));
43 expect(await frame.location.getLine(), equals(17)); 44 expect(await frame.location.getLine(), equals(17));
44 expect(await frame.location.getColumn(), equals(3)); 45 expect(await frame.location.getColumn(), equals(3));
45 } 46 }
46 ]; 47 ];
47 48
48 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 49 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/tests/service/regress_28443_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698