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

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

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library isolate_bad_class_test; 5 library isolate_bad_class_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'test_helper.dart'; 8 import 'test_helper.dart';
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 10
11 class NullCollectionTest extends VmServiceRequestHelper { 11 class NullCollectionTest extends VmServiceRequestHelper {
12 NullCollectionTest(port, id, collection) : 12 NullCollectionTest(port, id, collection) :
13 super('http://127.0.0.1:$port/isolates/$id/$collection/9999999'); 13 super('http://127.0.0.1:$port/$id/$collection/9999999');
14 14
15 onRequestCompleted(Map reply) { 15 onRequestCompleted(Map reply) {
16 Expect.equals('null', reply['type']); 16 Expect.equals('Error', reply['type']);
17 } 17 }
18 } 18 }
19 19
20 class BadCollectionTest extends VmServiceRequestHelper { 20 class BadCollectionTest extends VmServiceRequestHelper {
21 BadCollectionTest(port, id, collection) : 21 BadCollectionTest(port, id, collection) :
22 super('http://127.0.0.1:$port/isolates/$id/$collection'); 22 super('http://127.0.0.1:$port/$id/$collection');
23 23
24 onRequestCompleted(Map reply) { 24 onRequestCompleted(Map reply) {
25 Expect.equals('Error', reply['type']); 25 Expect.equals('Error', reply['type']);
26 } 26 }
27 } 27 }
28 28
29 class IsolateListTest extends VmServiceRequestHelper { 29 class IsolateListTest extends VmServiceRequestHelper {
30 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates'); 30 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates');
31 31
32 int _isolateId; 32 String _isolateId;
33 onRequestCompleted(Map reply) { 33 onRequestCompleted(Map reply) {
34 IsolateListTester tester = new IsolateListTester(reply); 34 IsolateListTester tester = new IsolateListTester(reply);
35 tester.checkIsolateCount(1); 35 tester.checkIsolateCount(1);
36 tester.checkIsolateNameContains('unknown_isolate_command_script.dart'); 36 tester.checkIsolateNameContains('unknown_isolate_command_script.dart');
37 _isolateId = reply['members'][0]['id']; 37 _isolateId = reply['members'][0]['id'];
38 } 38 }
39 } 39 }
40 40
41 main() { 41 main() {
42 var process = new TestLauncher('unknown_isolate_command_script.dart'); 42 var process = new TestLauncher('unknown_isolate_command_script.dart');
43 process.launch().then((port) { 43 process.launch().then((port) {
44 var test = new IsolateListTest(port); 44 var test = new IsolateListTest(port);
45 test.makeRequest().then((_) { 45 test.makeRequest().then((_) {
46 var badCollectionRequest = 46 var badCollectionRequest =
47 new BadCollectionTest(port, test._isolateId, 47 new BadCollectionTest(port, test._isolateId,
48 'foobar').makeRequest(); 48 'foobar').makeRequest();
49 var nullCollectionRequest = 49 var nullCollectionRequest =
50 new NullCollectionTest(port, test._isolateId, 50 new NullCollectionTest(port, test._isolateId,
51 'classes').makeRequest(); 51 'classes').makeRequest();
52 var requests = Future.wait([badCollectionRequest, nullCollectionRequest]); 52 var requests = Future.wait([badCollectionRequest, nullCollectionRequest]);
53 requests.then((_) { 53 requests.then((_) {
54 process.requestExit(); 54 process.requestExit();
55 }); 55 });
56 }); 56 });
57 }); 57 });
58 } 58 }
OLDNEW
« no previous file with comments | « dart/tests/standalone/debugger/local_function_test.dart ('k') | dart/tests/standalone/vmservice/isolate_bad_object_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698