| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library isolate_class_table_test; | |
| 6 | |
| 7 import 'dart:async'; | |
| 8 import 'test_helper.dart'; | |
| 9 import 'package:expect/expect.dart'; | |
| 10 | |
| 11 class ClassTableTest extends VmServiceRequestHelper { | |
| 12 ClassTableTest(port, id) : | |
| 13 super('http://127.0.0.1:$port/$id/classes'); | |
| 14 | |
| 15 onRequestCompleted(Map reply) { | |
| 16 ClassTableHelper helper = new ClassTableHelper(reply); | |
| 17 } | |
| 18 } | |
| 19 | |
| 20 class VMTest extends VmServiceRequestHelper { | |
| 21 VMTest(port) : super('http://127.0.0.1:$port/vm'); | |
| 22 | |
| 23 String _isolateId; | |
| 24 onRequestCompleted(Map reply) { | |
| 25 VMTester tester = new VMTester(reply); | |
| 26 tester.checkIsolateCount(1); | |
| 27 _isolateId = tester.getIsolateId(0); | |
| 28 } | |
| 29 } | |
| 30 | |
| 31 main() { | |
| 32 var process = new TestLauncher('field_script.dart'); | |
| 33 process.launch().then((port) { | |
| 34 var test = new VMTest(port); | |
| 35 test.makeRequest().then((_) { | |
| 36 var classTableTest = new ClassTableTest(port, test._isolateId); | |
| 37 classTableTest.makeRequest().then((_) { | |
| 38 process.requestExit(); | |
| 39 }); | |
| 40 }); | |
| 41 }); | |
| 42 } | |
| OLD | NEW |