| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library isolate_library_test; | 5 library isolate_library_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 | 10 |
| 11 class LibraryTest extends VmServiceRequestHelper { | 11 class LibraryTest extends VmServiceRequestHelper { |
| 12 LibraryTest(port, id, libId) : | 12 LibraryTest(port, id, libId) : |
| 13 super('http://127.0.0.1:$port/isolates/$id/libraries/$libId'); | 13 super('http://127.0.0.1:$port/isolates/$id/objects/$libId'); |
| 14 | 14 |
| 15 onRequestCompleted(Map reply) { | 15 onRequestCompleted(Map reply) { |
| 16 Expect.equals('Library', reply['type']); | 16 Expect.equals('Library', reply['type']); |
| 17 Expect.equals('isolate_stacktrace_command_script', reply['name']); | 17 Expect.equals('isolate_stacktrace_command_script', reply['name']); |
| 18 } | 18 } |
| 19 } | 19 } |
| 20 | 20 |
| 21 class RootLibraryTest extends VmServiceRequestHelper { | 21 class RootLibraryTest extends VmServiceRequestHelper { |
| 22 RootLibraryTest(port, id) : | 22 RootLibraryTest(port, id) : |
| 23 super('http://127.0.0.1:$port/isolates/$id/libraries'); | 23 super('http://127.0.0.1:$port/isolates/$id/library'); |
| 24 | 24 |
| 25 int _libId; | 25 int _libId; |
| 26 onRequestCompleted(Map reply) { | 26 onRequestCompleted(Map reply) { |
| 27 Expect.equals('@Library', reply['type']); | 27 Expect.equals('Library', reply['type']); |
| 28 Expect.equals('isolate_stacktrace_command_script', reply['name']); | 28 Expect.equals('isolate_stacktrace_command_script', reply['name']); |
| 29 _libId = reply['id']; | 29 _libId = reply['id']; |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 class IsolateListTest extends VmServiceRequestHelper { | 33 class IsolateListTest extends VmServiceRequestHelper { |
| 34 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates'); | 34 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates'); |
| 35 | 35 |
| 36 int _isolateId; | 36 int _isolateId; |
| 37 onRequestCompleted(Map reply) { | 37 onRequestCompleted(Map reply) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 52 rootLibraryTest.makeRequest().then((_) { | 52 rootLibraryTest.makeRequest().then((_) { |
| 53 var libraryTest = new LibraryTest(port, test._isolateId, | 53 var libraryTest = new LibraryTest(port, test._isolateId, |
| 54 rootLibraryTest._libId); | 54 rootLibraryTest._libId); |
| 55 libraryTest.makeRequest().then((_) { | 55 libraryTest.makeRequest().then((_) { |
| 56 process.requestExit(); | 56 process.requestExit(); |
| 57 }); | 57 }); |
| 58 }); | 58 }); |
| 59 }); | 59 }); |
| 60 }); | 60 }); |
| 61 } | 61 } |
| OLD | NEW |