Chromium Code Reviews| 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 // VMOptions=--short_socket_read | |
| 5 // VMOptions=--short_socket_write | |
| 6 // VMOptions=--short_socket_read --short_socket_write | |
| 7 // | |
| 8 // Test: | |
| 9 // *) Connect to VM Service and obtain list of running isolates. | |
| 10 // *) Spawn a second isolate and run test again. | |
|
siva
2013/07/19 17:41:16
How does the VM start with the VM service turned o
Cutch
2013/07/19 18:15:02
This test launches a new Dart instance with the --
| |
| 11 | |
| 12 library multiple_isolate_list_test; | |
| 13 | |
| 14 import 'test_helper.dart'; | |
| 15 import 'package:expect/expect.dart'; | |
| 16 | |
| 17 class MultipleIsolateListTest extends VmServiceRequestHelper { | |
| 18 MultipleIsolateListTest(port) : super('http://127.0.0.1:$port/isolates'); | |
| 19 | |
| 20 onRequestCompleted(Map reply) { | |
| 21 IsolateListTester tester = new IsolateListTester(reply); | |
| 22 tester.checkIsolateCount(2); | |
| 23 tester.checkIsolateIdExists(7116); | |
| 24 tester.checkIsolateNamePrefix(7116, 'multiple_isolate_list_script.dart'); | |
| 25 tester.checkIsolateNameContains('myIsolateName'); | |
| 26 } | |
| 27 } | |
| 28 | |
| 29 main() { | |
| 30 var process = new TestLauncher('multiple_isolate_list_script.dart'); | |
| 31 process.launch().then((port) { | |
| 32 var test = new MultipleIsolateListTest(port); | |
| 33 test.makeRequest().then((_) { | |
| 34 process.requestExit(); | |
| 35 }); | |
| 36 }); | |
| 37 } | |
| OLD | NEW |