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

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

Issue 24075002: Expose field data, use class id, and merge all collections into "objects" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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_class_test; 5 library isolate_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 ClassTest extends VmServiceRequestHelper { 11 class ClassTest extends VmServiceRequestHelper {
12 ClassTest(port, id, classId) : 12 ClassTest(port, id, classId) :
13 super('http://127.0.0.1:$port/isolates/$id/classes/$classId'); 13 super('http://127.0.0.1:$port/isolates/$id/classes/$classId');
14 14
15 onRequestCompleted(Map reply) { 15 onRequestCompleted(Map reply) {
16 Expect.equals('Class', reply['type']); 16 Expect.equals('Class', reply['type']);
17 Expect.equals('C', reply['name']); 17 Expect.equals('C', reply['name']);
18 Expect.equals('isolate_stacktrace_command_script', 18 Expect.equals('isolate_stacktrace_command_script',
19 reply['library']['name']); 19 reply['library']['name']);
20 } 20 }
21 } 21 }
22 22
23 class LibraryTest extends VmServiceRequestHelper { 23 class LibraryTest extends VmServiceRequestHelper {
24 LibraryTest(port, id, libId) : 24 LibraryTest(port, id, libId) :
25 super('http://127.0.0.1:$port/isolates/$id/libraries/$libId'); 25 super('http://127.0.0.1:$port/isolates/$id/objects/$libId');
26 26
27 int _classId; 27 int _classId;
28 onRequestCompleted(Map reply) { 28 onRequestCompleted(Map reply) {
29 Expect.equals('Library', reply['type']); 29 Expect.equals('Library', reply['type']);
30 Expect.equals('isolate_stacktrace_command_script', reply['name']); 30 Expect.equals('isolate_stacktrace_command_script', reply['name']);
31 Expect.equals(1, reply['classes'].length); 31 Expect.equals(1, reply['classes'].length);
32 Expect.equals('@Class', reply['classes'][0]['type']); 32 Expect.equals('@Class', reply['classes'][0]['type']);
33 Expect.equals('C', reply['classes'][0]['name']); 33 Expect.equals('C', reply['classes'][0]['name']);
34 _classId = reply['classes'][0]['id']; 34 _classId = reply['classes'][0]['id'];
35 } 35 }
36 } 36 }
37 37
38 class RootLibraryTest extends VmServiceRequestHelper { 38 class RootLibraryTest extends VmServiceRequestHelper {
39 RootLibraryTest(port, id) : 39 RootLibraryTest(port, id) :
40 super('http://127.0.0.1:$port/isolates/$id/libraries'); 40 super('http://127.0.0.1:$port/isolates/$id/library');
41 41
42 int _libId; 42 int _libId;
43 onRequestCompleted(Map reply) { 43 onRequestCompleted(Map reply) {
44 Expect.equals('@Library', reply['type']); 44 Expect.equals('Library', reply['type']);
45 Expect.equals('isolate_stacktrace_command_script', reply['name']); 45 Expect.equals('isolate_stacktrace_command_script', reply['name']);
46 _libId = reply['id']; 46 _libId = reply['id'];
47 } 47 }
48 } 48 }
49 49
50 class IsolateListTest extends VmServiceRequestHelper { 50 class IsolateListTest extends VmServiceRequestHelper {
51 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates'); 51 IsolateListTest(port) : super('http://127.0.0.1:$port/isolates');
52 52
53 int _isolateId; 53 int _isolateId;
54 onRequestCompleted(Map reply) { 54 onRequestCompleted(Map reply) {
(...skipping 18 matching lines...) Expand all
73 var classTest = new ClassTest(port, test._isolateId, 73 var classTest = new ClassTest(port, test._isolateId,
74 libraryTest._classId); 74 libraryTest._classId);
75 classTest.makeRequest().then((_) { 75 classTest.makeRequest().then((_) {
76 process.requestExit(); 76 process.requestExit();
77 }); 77 });
78 }); 78 });
79 }); 79 });
80 }); 80 });
81 }); 81 });
82 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698