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

Side by Side Diff: runtime/observatory/test/code_test.dart

Issue 897593003: Small refactor of pages (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
« no previous file with comments | « runtime/observatory/observatory.gypi ('k') | runtime/observatory/web/index_devtools.html » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'package:observatory/service_io.dart'; 5 import 'package:observatory/service_io.dart';
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'test_helper.dart'; 7 import 'test_helper.dart';
8 import 'dart:async'; 8 import 'dart:async';
9 9
10 int counter = 0; 10 int counter = 0;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 var frame0 = stack['frames'][0]; 59 var frame0 = stack['frames'][0];
60 var frame1 = stack['frames'][1]; 60 var frame1 = stack['frames'][1];
61 print(frame0); 61 print(frame0);
62 expect(frame0['function'].name, equals('funcB')); 62 expect(frame0['function'].name, equals('funcB'));
63 expect(frame1['function'].name, equals('funcA')); 63 expect(frame1['function'].name, equals('funcA'));
64 var codeId0 = frame0['code'].id; 64 var codeId0 = frame0['code'].id;
65 var codeId1 = frame1['code'].id; 65 var codeId1 = frame1['code'].id;
66 66
67 List tests = []; 67 List tests = [];
68 // Load code from frame 0. 68 // Load code from frame 0.
69 tests.add(isolate.get(codeId0)..then((ServiceObject code) { 69 tests.add(isolate.get(codeId0)..then((Code code) {
70 expect(code.type, equals('Code')); 70 expect(code.type, equals('Code'));
71 expect(code.function.name, equals('funcB')); 71 expect(code.function.name, equals('funcB'));
72 expect(code.hasDisassembly, equals(true)); 72 expect(code.hasDisassembly, equals(true));
73 })); 73 }));
74 // Load code from frame 0. 74 // Load code from frame 0.
75 tests.add(isolate.get(codeId1)..then((ServiceObject code) { 75 tests.add(isolate.get(codeId1)..then((Code code) {
76 expect(code.type, equals('Code')); 76 expect(code.type, equals('Code'));
77 expect(code.function.name, equals('funcA')); 77 expect(code.function.name, equals('funcA'));
78 expect(code.hasDisassembly, equals(true)); 78 expect(code.hasDisassembly, equals(true));
79 })); 79 }));
80 return Future.wait(tests); 80 return Future.wait(tests);
81 }); 81 });
82 }, 82 },
83 83
84 ]; 84 ];
85 85
86 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); 86 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction);
OLDNEW
« no previous file with comments | « runtime/observatory/observatory.gypi ('k') | runtime/observatory/web/index_devtools.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698