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

Side by Side Diff: tests/standalone/vmservice/isolate_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/vmservice/isolate_function_test.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
(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_library_test;
6
7 import 'dart:async';
8 import 'test_helper.dart';
9 import 'package:expect/expect.dart';
10
11 class LibraryTest extends VmServiceRequestHelper {
12 LibraryTest(port, id, libId) :
13 super('http://127.0.0.1:$port/isolates/$id/libraries/$libId');
14
15 onRequestCompleted(Map reply) {
16 Expect.equals('Library', reply['type']);
17 Expect.equals('isolate_stacktrace_command_script', reply['name']);
18 }
19 }
20
21 class RootLibraryTest extends VmServiceRequestHelper {
22 RootLibraryTest(port, id) :
23 super('http://127.0.0.1:$port/isolates/$id/libraries');
24
25 int _libId;
26 onRequestCompleted(Map reply) {
27 Expect.equals('@Library', reply['type']);
28 Expect.equals('isolate_stacktrace_command_script', reply['name']);
29 _libId = reply['id'];
30 }
31 }
32
33 class IsolateListTest extends VmServiceRequestHelper {
34 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates');
35
36 int _isolateId;
37 onRequestCompleted(Map reply) {
38 IsolateListTester tester = new IsolateListTester(reply);
39 tester.checkIsolateCount(2);
40 tester.checkIsolateNameContains('isolate_stacktrace_command_script.dart');
41 _isolateId = tester.checkIsolateNameContains('myIsolateName');
42 }
43 }
44
45 main() {
46 var process = new TestLauncher('isolate_stacktrace_command_script.dart');
47 process.launch().then((port) {
48 var test = new IsolateListTest(port);
49 test.makeRequest().then((_) {
50 var rootLibraryTest =
51 new RootLibraryTest(port, test._isolateId);
52 rootLibraryTest.makeRequest().then((_) {
53 var libraryTest = new LibraryTest(port, test._isolateId,
54 rootLibraryTest._libId);
55 libraryTest.makeRequest().then((_) {
56 process.requestExit();
57 });
58 });
59 });
60 });
61 }
OLDNEW
« no previous file with comments | « tests/standalone/vmservice/isolate_function_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698