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

Unified Diff: runtime/observatory/tests/service/process_service_test.dart

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/tests/service/process_service_test.dart
diff --git a/runtime/observatory/tests/service/process_service_test.dart b/runtime/observatory/tests/service/process_service_test.dart
index 5edf99a16dbb59076c22c0347ce097749c153d36..ee529c9e53efc1ccdef18e005e51bd99af8ed244 100644
--- a/runtime/observatory/tests/service/process_service_test.dart
+++ b/runtime/observatory/tests/service/process_service_test.dart
@@ -33,48 +33,50 @@ Future setupProcesses() async {
Future<ServiceExtensionResponse> cleanup(ignored_a, ignored_b) {
closeDown();
- var result = JSON.encode({'type': 'foobar'});
+ var result = JSON.encode({'type' : 'foobar'});
return new Future.value(new ServiceExtensionResponse.result(result));
}
Future<ServiceExtensionResponse> setup(ignored_a, ignored_b) async {
try {
process1 = await io.Process.start(io.Platform.executable, args);
- process2 =
- await io.Process.start(io.Platform.executable, args..add('foobar'));
+ process2 = await io.Process.start(io.Platform.executable,
+ args..add('foobar'));
var codeFilePath = dir.path + io.Platform.pathSeparator + "other_file";
var codeFile = new io.File(codeFilePath);
- await codeFile.writeAsString('''
+ await codeFile.writeAsString(
+ '''
import "dart:io";
void main() async {
await stdin.drain();
}
''');
- process3 = await io.Process.start(io.Platform.executable, [codeFilePath]);
+ process3 = await io.Process.start(io.Platform.executable,
+ [codeFilePath]);
} catch (e) {
closeDown();
throw e;
}
- var result = JSON.encode({
- 'type': 'foobar',
- 'pids': [process1.pid, process2.pid, process3.pid]
- });
+ var result =
+ JSON.encode({'type': 'foobar',
+ 'pids' : [process1.pid, process2.pid, process3.pid]});
return new Future.value(new ServiceExtensionResponse.result(result));
}
Future<ServiceExtensionResponse> closeStdin(ignored_a, ignored_b) async {
process3.stdin.close();
- var result = JSON.encode({'type': 'foobar'});
+ var result = JSON.encode({'type' : 'foobar'});
var returnValue =
new Future.value(new ServiceExtensionResponse.result(result));
- return process3.exitCode.then((int exit) => returnValue);
+ return process3.exitCode.then((int exit) => returnValue);
}
registerExtension('ext.dart.io.cleanup', cleanup);
registerExtension('ext.dart.io.setup', setup);
registerExtension('ext.dart.io.closeStdin', closeStdin);
+
}
var processTests = [
@@ -89,14 +91,14 @@ var processTests = [
expect(all['data'].length, equals(3));
var first = await isolate.invokeRpcNoUpgrade(
- 'ext.dart.io.getProcessById', {'id': all['data'][0]['id']});
+ 'ext.dart.io.getProcessById', { 'id' : all['data'][0]['id'] });
expect(first['name'], io.Platform.executable);
expect(first['pid'], equals(setup['pids'][0]));
expect(first['arguments'].contains('foobar'), isFalse);
expect(first['startedAt'], greaterThan(0));
var second = await isolate.invokeRpcNoUpgrade(
- 'ext.dart.io.getProcessById', {'id': all['data'][1]['id']});
+ 'ext.dart.io.getProcessById', { 'id' : all['data'][1]['id'] });
expect(second['name'], io.Platform.executable);
expect(second['pid'], equals(setup['pids'][1]));
expect(second['arguments'].contains('foobar'), isTrue);
@@ -105,7 +107,7 @@ var processTests = [
expect(second['startedAt'], greaterThanOrEqualTo(first['startedAt']));
var third = await isolate.invokeRpcNoUpgrade(
- 'ext.dart.io.getProcessById', {'id': all['data'][2]['id']});
+ 'ext.dart.io.getProcessById', { 'id' : all['data'][2]['id'] });
expect(third['name'], io.Platform.executable);
expect(third['pid'], equals(setup['pids'][2]));
expect(third['pid'] != first['pid'], isTrue);
@@ -122,5 +124,5 @@ var processTests = [
},
];
-main(args) async =>
- runIsolateTests(args, processTests, testeeBefore: setupProcesses);
+main(args) async => runIsolateTests(args, processTests,
+ testeeBefore:setupProcesses);

Powered by Google App Engine
This is Rietveld 408576698