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

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

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: Created 3 years, 9 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
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 // VMOptions=--error_on_bad_type --error_on_bad_override --complete_timeline 4 // VMOptions=--error_on_bad_type --error_on_bad_override --complete_timeline
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 expect(eventsContains(dartEvents, 'I', 'ISYNC'), isTrue); 98 expect(eventsContains(dartEvents, 'I', 'ISYNC'), isTrue);
99 expect(eventsContains(dartEvents, 'X', 'apple'), isTrue); 99 expect(eventsContains(dartEvents, 'X', 'apple'), isTrue);
100 expect(eventsContains(dartEvents, 'b', 'TASK1'), isTrue); 100 expect(eventsContains(dartEvents, 'b', 'TASK1'), isTrue);
101 expect(eventsContains(dartEvents, 'e', 'TASK1'), isTrue); 101 expect(eventsContains(dartEvents, 'e', 'TASK1'), isTrue);
102 expect(eventsContains(dartEvents, 'n', 'ITASK'), isTrue); 102 expect(eventsContains(dartEvents, 'n', 'ITASK'), isTrue);
103 expect(eventsContains(dartEvents, 'q', 'ITASK'), isFalse); 103 expect(eventsContains(dartEvents, 'q', 'ITASK'), isFalse);
104 // Calculate the time Window of Dart events. 104 // Calculate the time Window of Dart events.
105 int origin = timeOrigin(dartEvents); 105 int origin = timeOrigin(dartEvents);
106 int extent = timeDuration(dartEvents, origin); 106 int extent = timeDuration(dartEvents, origin);
107 // Query for the timeline with the time window for Dart events. 107 // Query for the timeline with the time window for Dart events.
108 result = await vm.invokeRpcNoUpgrade('_getVMTimeline', { 108 result = await vm.invokeRpcNoUpgrade('_getVMTimeline',
109 'timeOriginMicros': origin, 109 {'timeOriginMicros': origin, 'timeExtentMicros': extent});
110 'timeExtentMicros': extent
111 });
112 // Verify that we received fewer events than before. 110 // Verify that we received fewer events than before.
113 expect(result['traceEvents'].length, lessThan(numEvents)); 111 expect(result['traceEvents'].length, lessThan(numEvents));
114 // Verify that we have the same number of Dart events. 112 // Verify that we have the same number of Dart events.
115 List<Map> dartEvents2 = filterForDartEvents(result['traceEvents']); 113 List<Map> dartEvents2 = filterForDartEvents(result['traceEvents']);
116 expect(dartEvents2.length, dartEvents.length); 114 expect(dartEvents2.length, dartEvents.length);
117 }, 115 },
118 ]; 116 ];
119 117
120 main(args) async => runVMTests(args, tests, testeeBefore: primeTimeline); 118 main(args) async => runVMTests(args, tests, testeeBefore: primeTimeline);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698