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

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

Issue 19870006: Support stacktrace and objecthistogram service commands (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/vmservice/unknown_isolate_command_script.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // VMOptions=--short_socket_read
5 // VMOptions=--short_socket_write
6 // VMOptions=--short_socket_read --short_socket_write
7 //
8 // Test:
9 // *) Connect to VM Service and obtain list of running isolates.
10 4
11 library isolate_list_test; 5 library unknown_isolate_command_test;
12 6
13 import 'test_helper.dart'; 7 import 'test_helper.dart';
14 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
15 9
10 class UnknownRequestTest extends VmServiceRequestHelper {
11 UnknownRequestTest(port, id) :
12 super('http://127.0.0.1:$port/isolates/$id/badrequest');
13
14 onRequestCompleted(Map reply) {
15 Expect.equals('error', reply['type']);
16 }
17 }
16 18
17 class IsolateListTest extends VmServiceRequestHelper { 19 class IsolateListTest extends VmServiceRequestHelper {
18 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates'); 20 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates');
19 21
22 int _isolateId;
20 onRequestCompleted(Map reply) { 23 onRequestCompleted(Map reply) {
21 IsolateListTester tester = new IsolateListTester(reply); 24 IsolateListTester tester = new IsolateListTester(reply);
22 tester.checkIsolateCount(1); 25 tester.checkIsolateCount(1);
23 tester.checkIsolateNameContains('isolate_list_script.dart'); 26 tester.checkIsolateNameContains('unknown_isolate_command_script.dart');
27 _isolateId = reply['members'][0]['id'];
24 } 28 }
25 } 29 }
26 30
27 31
28 main() { 32 main() {
29 var process = new TestLauncher('isolate_list_script.dart'); 33 var process = new TestLauncher('unknown_isolate_command_script.dart');
30 process.launch().then((port) { 34 process.launch().then((port) {
31 var test = new IsolateListTest(port); 35 var test = new IsolateListTest(port);
32 test.makeRequest().then((_) { 36 test.makeRequest().then((_) {
33 process.requestExit(); 37 var unknownRequestTest = new UnknownRequestTest(port, test._isolateId);
38 unknownRequestTest.makeRequest().then((_) {
39 process.requestExit();
40 });
34 }); 41 });
35 }); 42 });
36 } 43 }
OLDNEW
« no previous file with comments | « tests/standalone/vmservice/unknown_isolate_command_script.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698