| Index: tests/standalone/vmservice/isolate_bad_function_test.dart
|
| diff --git a/tests/standalone/vmservice/unknown_isolate_command_test.dart b/tests/standalone/vmservice/isolate_bad_function_test.dart
|
| similarity index 53%
|
| copy from tests/standalone/vmservice/unknown_isolate_command_test.dart
|
| copy to tests/standalone/vmservice/isolate_bad_function_test.dart
|
| index b6abf0bca9acede4bd7ce8550de9d2b74b073722..3b6c414159a0b23c72908631212dee5a9165fef4 100644
|
| --- a/tests/standalone/vmservice/unknown_isolate_command_test.dart
|
| +++ b/tests/standalone/vmservice/isolate_bad_function_test.dart
|
| @@ -2,14 +2,24 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library unknown_isolate_command_test;
|
| +library isolate_bad_function_test;
|
|
|
| +import 'dart:async';
|
| 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');
|
| +class NullCollectionTest extends VmServiceRequestHelper {
|
| + NullCollectionTest(port, id, collection) :
|
| + super('http://127.0.0.1:$port/isolates/$id/$collection/-99');
|
| +
|
| + onRequestCompleted(Map reply) {
|
| + Expect.equals('null', reply['type']);
|
| + }
|
| +}
|
| +
|
| +class BadCollectionTest extends VmServiceRequestHelper {
|
| + BadCollectionTest(port, id, collection) :
|
| + super('http://127.0.0.1:$port/isolates/$id/$collection');
|
|
|
| onRequestCompleted(Map reply) {
|
| Expect.equals('error', reply['type']);
|
| @@ -28,14 +38,19 @@ class IsolateListTest extends VmServiceRequestHelper {
|
| }
|
| }
|
|
|
| -
|
| main() {
|
| var process = new TestLauncher('unknown_isolate_command_script.dart');
|
| process.launch().then((port) {
|
| var test = new IsolateListTest(port);
|
| test.makeRequest().then((_) {
|
| - var unknownRequestTest = new UnknownRequestTest(port, test._isolateId);
|
| - unknownRequestTest.makeRequest().then((_) {
|
| + var badCollectionRequest =
|
| + new BadCollectionTest(port, test._isolateId,
|
| + 'functions').makeRequest();
|
| + var nullCollectionRequest =
|
| + new NullCollectionTest(port, test._isolateId,
|
| + 'functions').makeRequest();
|
| + var requests = Future.wait([badCollectionRequest, nullCollectionRequest]);
|
| + requests.then((_) {
|
| process.requestExit();
|
| });
|
| });
|
|
|