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

Side by Side Diff: runtime/observatory/tests/service/vm_timeline_flags_test.dart

Issue 1699153002: Add step OverAwait to service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/debugger.h » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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=--error_on_bad_type --error_on_bad_override 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'dart:developer'; 6 import 'dart:developer';
7 import 'package:observatory/service_io.dart'; 7 import 'package:observatory/service_io.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 import 'test_helper.dart'; 10 import 'test_helper.dart';
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 "recordedStreams": ["Dart"] 53 "recordedStreams": ["Dart"]
54 }); 54 });
55 }, 55 },
56 (Isolate isolate) async { 56 (Isolate isolate) async {
57 // Get the flags. 57 // Get the flags.
58 Map flags = await isolate.vm.invokeRpcNoUpgrade('_getVMTimelineFlags', {}); 58 Map flags = await isolate.vm.invokeRpcNoUpgrade('_getVMTimelineFlags', {});
59 expect(flags['type'], 'TimelineFlags'); 59 expect(flags['type'], 'TimelineFlags');
60 // Confirm that only Dart is being recorded. 60 // Confirm that only Dart is being recorded.
61 expect(flags['recordedStreams'].length, equals(1)); 61 expect(flags['recordedStreams'].length, equals(1));
62 expect(flags['recordedStreams'].contains('Dart'), isTrue); 62 expect(flags['recordedStreams'].contains('Dart'), isTrue);
63 print(flags);
63 }, 64 },
64 resumeIsolate, 65 resumeIsolate,
65 (Isolate isolate) async { 66 (Isolate isolate) async {
66 // Get the timeline. 67 // Get the timeline.
67 Map result = await isolate.vm.invokeRpcNoUpgrade('_getVMTimeline', {}); 68 Map result = await isolate.vm.invokeRpcNoUpgrade('_getVMTimeline', {});
68 expect(result['type'], equals('_Timeline')); 69 expect(result['type'], equals('_Timeline'));
69 expect(result['traceEvents'], new isInstanceOf<List>()); 70 expect(result['traceEvents'], new isInstanceOf<List>());
71 print(result['traceEvents']);
70 // Confirm that Dart events are added. 72 // Confirm that Dart events are added.
71 expect(filterEvents(result['traceEvents'], isDart).length, greaterThan(0)); 73 expect(filterEvents(result['traceEvents'], isDart).length, greaterThan(0));
72 // Confirm that zero non-Dart events are added. 74 // Confirm that zero non-Dart events are added.
73 expect( 75 expect(
74 filterEvents(result['traceEvents'], isNotDartAndMetaData).length, 76 filterEvents(result['traceEvents'], isNotDartAndMetaData).length,
75 equals(0)); 77 equals(0));
76 }, 78 },
77 hasStoppedAtBreakpoint, 79 hasStoppedAtBreakpoint,
78 (Isolate isolate) async { 80 (Isolate isolate) async {
79 // Disable the Dart category. 81 // Disable the Dart category.
(...skipping 23 matching lines...) Expand all
103 // Confirm that zero non-Dart events are added. 105 // Confirm that zero non-Dart events are added.
104 expect( 106 expect(
105 filterEvents(result['traceEvents'], isNotDartAndMetaData).length, 107 filterEvents(result['traceEvents'], isNotDartAndMetaData).length,
106 equals(0)); 108 equals(0));
107 }, 109 },
108 ]; 110 ];
109 111
110 main(args) async => runIsolateTests(args, 112 main(args) async => runIsolateTests(args,
111 tests, 113 tests,
112 testeeConcurrent: primeDartTimeline); 114 testeeConcurrent: primeDartTimeline);
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698