Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
| 5 | 5 |
| 6 library set_library_debuggable_test; | 6 library set_library_debuggable_test; |
| 7 | 7 |
| 8 import 'dart:developer'; | 8 import 'dart:developer'; |
| 9 import 'package:observatory/service_io.dart'; | 9 import 'package:observatory/service_io.dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 } | 23 } |
| 24 | 24 |
| 25 var tests = [ | 25 var tests = [ |
| 26 (Isolate isolate) async { | 26 (Isolate isolate) async { |
| 27 await isolate.reload(); | 27 await isolate.reload(); |
| 28 Library dartCore = isolate.libraries.firstWhere( | 28 Library dartCore = isolate.libraries.firstWhere( |
| 29 (Library library) => library.uri == 'dart:core'); | 29 (Library library) => library.uri == 'dart:core'); |
| 30 await dartCore.load(); | 30 await dartCore.load(); |
| 31 expect(dartCore.debuggable, equals(true)); | 31 expect(dartCore.debuggable, equals(true)); |
| 32 }, | 32 }, |
| 33 stoppedInFunction('testMain', contains:true), | 33 stoppedInFunction('testMain', contains: true, includeOwner: true), |
|
Cutch
2017/02/08 16:48:20
why is includeOwner needed here?
jensj
2017/02/13 14:04:16
From source the name of the async function is some
Cutch
2017/03/07 01:58:37
The function names reported via kernel and the VM
jensj
2017/03/07 08:43:40
I actually think they are today. It was done a wee
| |
| 34 stoppedAtLine(LINE_A), | 34 stoppedAtLine(LINE_A), |
| 35 stepInto, | 35 stepInto, |
| 36 stoppedInFunction('print'), | 36 stoppedInFunction('print'), |
| 37 stepOut, | 37 stepOut, |
| 38 stoppedInFunction('testMain', contains:true), | 38 stoppedInFunction('testMain', contains: true, includeOwner: true), |
|
Cutch
2017/03/07 01:58:37
dito here
| |
| 39 stoppedAtLine(LINE_B), | 39 stoppedAtLine(LINE_B), |
| 40 (Isolate isolate) async { | 40 (Isolate isolate) async { |
| 41 // Mark 'dart:core' as not debuggable. | 41 // Mark 'dart:core' as not debuggable. |
| 42 await isolate.reload(); | 42 await isolate.reload(); |
| 43 Library dartCore = isolate.libraries.firstWhere( | 43 Library dartCore = isolate.libraries.firstWhere( |
| 44 (Library library) => library.uri == 'dart:core'); | 44 (Library library) => library.uri == 'dart:core'); |
| 45 await dartCore.load(); | 45 await dartCore.load(); |
| 46 expect(dartCore.debuggable, equals(true)); | 46 expect(dartCore.debuggable, equals(true)); |
| 47 var setDebugParams = { | 47 var setDebugParams = { |
| 48 'libraryId': dartCore.id, | 48 'libraryId': dartCore.id, |
| 49 'isDebuggable': false, | 49 'isDebuggable': false, |
| 50 }; | 50 }; |
| 51 Map<String, dynamic> result = | 51 Map<String, dynamic> result = |
| 52 await isolate.invokeRpcNoUpgrade('setLibraryDebuggable', | 52 await isolate.invokeRpcNoUpgrade('setLibraryDebuggable', |
| 53 setDebugParams); | 53 setDebugParams); |
| 54 expect(result['type'], equals('Success')); | 54 expect(result['type'], equals('Success')); |
| 55 await dartCore.reload(); | 55 await dartCore.reload(); |
| 56 expect(dartCore.debuggable, equals(false)); | 56 expect(dartCore.debuggable, equals(false)); |
| 57 }, | 57 }, |
| 58 stoppedInFunction('testMain', contains:true), | 58 stoppedInFunction('testMain', contains: true, includeOwner: true), |
| 59 stoppedAtLine(LINE_B), | 59 stoppedAtLine(LINE_B), |
| 60 stepInto, | 60 stepInto, |
| 61 stoppedInFunction('testMain', contains:true), | 61 stoppedInFunction('testMain', contains: true, includeOwner: true), |
| 62 stoppedAtLine(LINE_C), | 62 stoppedAtLine(LINE_C), |
| 63 ]; | 63 ]; |
| 64 | 64 |
| 65 main(args) async => runIsolateTests(args, tests, testeeConcurrent: testMain); | 65 main(args) async => runIsolateTests(args, tests, testeeConcurrent: testMain); |
| OLD | NEW |