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

Side by Side Diff: tests/standalone/vmservice/isolate_bad_class_test.dart

Issue 895093002: Add getClassList RPC (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_bad_class_test;
6
7 import 'dart:async';
8 import 'test_helper.dart';
9 import 'package:expect/expect.dart';
10
11 class NullCollectionTest extends VmServiceRequestHelper {
12 NullCollectionTest(port, id, collection) :
13 super('http://127.0.0.1:$port/$id/$collection/9999999');
14
15 onRequestCompleted(Map reply) {
16 Expect.equals('Error', reply['type']);
17 }
18 }
19
20 class BadCollectionTest extends VmServiceRequestHelper {
21 BadCollectionTest(port, id, collection) :
22 super('http://127.0.0.1:$port/$id/$collection');
23
24 onRequestCompleted(Map reply) {
25 Expect.equals('Error', reply['type']);
26 }
27 }
28
29 class VMTest extends VmServiceRequestHelper {
30 VMTest(port) : super('http://127.0.0.1:$port/vm');
31
32 String _isolateId;
33 onRequestCompleted(Map reply) {
34 VMTester tester = new VMTester(reply);
35 tester.checkIsolateCount(1);
36 _isolateId = tester.getIsolateId(0);
37 }
38 }
39
40 main() {
41 var process = new TestLauncher('unknown_isolate_command_script.dart');
42 process.launch().then((port) {
43 var test = new VMTest(port);
44 test.makeRequest().then((_) {
45 var badCollectionRequest =
46 new BadCollectionTest(port, test._isolateId,
47 'foobar').makeRequest();
48 var nullCollectionRequest =
49 new NullCollectionTest(port, test._isolateId,
50 'classes').makeRequest();
51 var requests = Future.wait([badCollectionRequest, nullCollectionRequest]);
52 requests.then((_) {
53 process.requestExit();
54 });
55 });
56 });
57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698