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

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

Issue 1343033002: Use cammelCase for all service extension variables (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
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 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:developer'; 7 import 'dart:developer';
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 import 'package:observatory/service_io.dart'; 9 import 'package:observatory/service_io.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 var all = await isolate.invokeRpcNoUpgrade('__getProcesses', {}); 87 var all = await isolate.invokeRpcNoUpgrade('__getProcesses', {});
88 expect(all['type'], equals('_startedprocesses')); 88 expect(all['type'], equals('_startedprocesses'));
89 89
90 expect(all['data'].length, equals(3)); 90 expect(all['data'].length, equals(3));
91 91
92 var first = await isolate.invokeRpcNoUpgrade( 92 var first = await isolate.invokeRpcNoUpgrade(
93 '__getProcessById', { 'id' : all['data'][0]['id'] }); 93 '__getProcessById', { 'id' : all['data'][0]['id'] });
94 expect(first['name'], io.Platform.executable); 94 expect(first['name'], io.Platform.executable);
95 expect(first['pid'], equals(setup['pids'][0])); 95 expect(first['pid'], equals(setup['pids'][0]));
96 expect(first['arguments'].contains('foobar'), isFalse); 96 expect(first['arguments'].contains('foobar'), isFalse);
97 expect(first['started_at'], greaterThan(0)); 97 expect(first['startedAt'], greaterThan(0));
98 98
99 var second = await isolate.invokeRpcNoUpgrade( 99 var second = await isolate.invokeRpcNoUpgrade(
100 '__getProcessById', { 'id' : all['data'][1]['id'] }); 100 '__getProcessById', { 'id' : all['data'][1]['id'] });
101 expect(second['name'], io.Platform.executable); 101 expect(second['name'], io.Platform.executable);
102 expect(second['pid'], equals(setup['pids'][1])); 102 expect(second['pid'], equals(setup['pids'][1]));
103 expect(second['arguments'].contains('foobar'), isTrue); 103 expect(second['arguments'].contains('foobar'), isTrue);
104 expect(second['pid'] != first['pid'], isTrue); 104 expect(second['pid'] != first['pid'], isTrue);
105 expect(second['started_at'], greaterThan(0)); 105 expect(second['startedAt'], greaterThan(0));
106 expect(second['started_at'], greaterThanOrEqualTo(first['started_at'])); 106 expect(second['startedAt'], greaterThanOrEqualTo(first['startedAt']));
107 107
108 var third = await isolate.invokeRpcNoUpgrade( 108 var third = await isolate.invokeRpcNoUpgrade(
109 '__getProcessById', { 'id' : all['data'][2]['id'] }); 109 '__getProcessById', { 'id' : all['data'][2]['id'] });
110 expect(third['name'], io.Platform.executable); 110 expect(third['name'], io.Platform.executable);
111 expect(third['pid'], equals(setup['pids'][2])); 111 expect(third['pid'], equals(setup['pids'][2]));
112 expect(third['pid'] != first['pid'], isTrue); 112 expect(third['pid'] != first['pid'], isTrue);
113 expect(third['pid'] != second['pid'], isTrue); 113 expect(third['pid'] != second['pid'], isTrue);
114 expect(third['started_at'], greaterThanOrEqualTo(second['started_at'])); 114 expect(third['startedAt'], greaterThanOrEqualTo(second['startedAt']));
115 115
116 await isolate.invokeRpcNoUpgrade('__closeStdin', {}); 116 await isolate.invokeRpcNoUpgrade('__closeStdin', {});
117 all = await isolate.invokeRpcNoUpgrade('__getProcesses', {}); 117 all = await isolate.invokeRpcNoUpgrade('__getProcesses', {});
118 expect(all['type'], equals('_startedprocesses')); 118 expect(all['type'], equals('_startedprocesses'));
119 expect(all['data'].length, equals(2)); 119 expect(all['data'].length, equals(2));
120 } finally { 120 } finally {
121 await isolate.invokeRpcNoUpgrade('__cleanup', {}); 121 await isolate.invokeRpcNoUpgrade('__cleanup', {});
122 } 122 }
123 }, 123 },
124 ]; 124 ];
125 125
126 main(args) async => runIsolateTests(args, processTests, 126 main(args) async => runIsolateTests(args, processTests,
127 testeeBefore:setupProcesses); 127 testeeBefore:setupProcesses);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698