| Index: tests/standalone/vmservice/unknown_isolate_command_test.dart
|
| diff --git a/tests/standalone/vmservice/isolate_list_test.dart b/tests/standalone/vmservice/unknown_isolate_command_test.dart
|
| similarity index 57%
|
| copy from tests/standalone/vmservice/isolate_list_test.dart
|
| copy to tests/standalone/vmservice/unknown_isolate_command_test.dart
|
| index 2e68ced3cfefeafb988e78ea6901f6bd776839e3..133b80c284c77fa3d3a26c77399f18933f30fc89 100644
|
| --- a/tests/standalone/vmservice/isolate_list_test.dart
|
| +++ b/tests/standalone/vmservice/unknown_isolate_command_test.dart
|
| @@ -8,29 +8,42 @@
|
| // Test:
|
| // *) Connect to VM Service and obtain list of running isolates.
|
|
|
| -library isolate_list_test;
|
| +library unknown_isolate_command_test;
|
|
|
| import 'test_helper.dart';
|
| import 'package:expect/expect.dart';
|
|
|
| +class UnknownRequestTest extends VmServiceRequestHelper {
|
| + UnknownRequestTest(port, id) :
|
| + super('http://127.0.0.1:$port/isolates/$id/badrequest');
|
| +
|
| + onRequestCompleted(Map reply) {
|
| + Expect.equals('error', reply['type']);
|
| + }
|
| +}
|
|
|
| class IsolateListTest extends VmServiceRequestHelper {
|
| IsolateListTest(port) : super('http://127.0.0.1:$port/isolates');
|
|
|
| + int _isolateId;
|
| onRequestCompleted(Map reply) {
|
| IsolateListTester tester = new IsolateListTester(reply);
|
| tester.checkIsolateCount(1);
|
| - tester.checkIsolateNameContains('isolate_list_script.dart');
|
| + tester.checkIsolateNameContains('unknown_isolate_command_script.dart');
|
| + _isolateId = reply['members'][0]['id'];
|
| }
|
| }
|
|
|
|
|
| main() {
|
| - var process = new TestLauncher('isolate_list_script.dart');
|
| + var process = new TestLauncher('unknown_isolate_command_script.dart');
|
| process.launch().then((port) {
|
| var test = new IsolateListTest(port);
|
| test.makeRequest().then((_) {
|
| - process.requestExit();
|
| + var unknownRequestTest = new UnknownRequestTest(port, test._isolateId);
|
| + unknownRequestTest.makeRequest().then((_) {
|
| + process.requestExit();
|
| + });
|
| });
|
| });
|
| }
|
|
|