Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Unified Diff: tests/standalone/vmservice/isolate_bad_library_test.dart

Issue 22297008: Expose classes, codes, functions, and libraries collections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/standalone/vmservice/isolate_bad_library_test.dart
diff --git a/tests/standalone/vmservice/unknown_isolate_command_test.dart b/tests/standalone/vmservice/isolate_bad_library_test.dart
similarity index 58%
copy from tests/standalone/vmservice/unknown_isolate_command_test.dart
copy to tests/standalone/vmservice/isolate_bad_library_test.dart
index b6abf0bca9acede4bd7ce8550de9d2b74b073722..c7d2c549f01cc122f36cbef5a438d51ceb1c5823 100644
--- a/tests/standalone/vmservice/unknown_isolate_command_test.dart
+++ b/tests/standalone/vmservice/isolate_bad_library_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_library_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/-100');
+
+ 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,16 @@ 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 nullCollectionRequest =
+ new NullCollectionTest(port, test._isolateId,
+ 'libraries').makeRequest();
+ var requests = Future.wait([nullCollectionRequest]);
+ requests.then((_) {
process.requestExit();
});
});
« no previous file with comments | « tests/standalone/vmservice/isolate_bad_function_test.dart ('k') | tests/standalone/vmservice/isolate_class_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698