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

Side by Side Diff: runtime/observatory/tests/service/get_retained_size_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 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 8
9 import 'test_helper.dart'; 9 import 'test_helper.dart';
10 10
(...skipping 11 matching lines...) Expand all
22 Map params = { 22 Map params = {
23 'targetId': isolate.rootLibrary.id, 23 'targetId': isolate.rootLibrary.id,
24 'expression': expression, 24 'expression': expression,
25 }; 25 };
26 return await isolate.invokeRpcNoUpgrade('evaluate', params); 26 return await isolate.invokeRpcNoUpgrade('evaluate', params);
27 } 27 }
28 28
29 var tests = [ 29 var tests = [
30 (Isolate isolate) async { 30 (Isolate isolate) async {
31 // One instance of _TestClass retained. 31 // One instance of _TestClass retained.
32 var evalResult = await eval( 32 var evalResult = await eval(isolate, 'myVar = new _TestClass(null, null)');
33 isolate, 'myVar = new _TestClass(null, null)');
34 var params = { 33 var params = {
35 'targetId': evalResult['id'], 34 'targetId': evalResult['id'],
36 }; 35 };
37 var result = await isolate.invokeRpcNoUpgrade('_getRetainedSize', params); 36 var result = await isolate.invokeRpcNoUpgrade('_getRetainedSize', params);
38 expect(result['type'], equals('@Instance')); 37 expect(result['type'], equals('@Instance'));
39 expect(result['kind'], equals('Int')); 38 expect(result['kind'], equals('Int'));
40 int value1 = int.parse(result['valueAsString']); 39 int value1 = int.parse(result['valueAsString']);
41 expect(value1, isPositive); 40 expect(value1, isPositive);
42 41
43 // Two instances of _TestClass retained. 42 // Two instances of _TestClass retained.
(...skipping 18 matching lines...) Expand all
62 result = await isolate.invokeRpcNoUpgrade('_getRetainedSize', params); 61 result = await isolate.invokeRpcNoUpgrade('_getRetainedSize', params);
63 expect(result['type'], equals('@Instance')); 62 expect(result['type'], equals('@Instance'));
64 expect(result['kind'], equals('Int')); 63 expect(result['kind'], equals('Int'));
65 int value3 = int.parse(result['valueAsString']); 64 int value3 = int.parse(result['valueAsString']);
66 expect(value3, isPositive); 65 expect(value3, isPositive);
67 expect(value3, equals(value2)); 66 expect(value3, equals(value2));
68 }, 67 },
69 ]; 68 ];
70 69
71 main(args) async => runIsolateTests(args, tests); 70 main(args) async => runIsolateTests(args, tests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698