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

Unified Diff: pkg/testing/lib/src/zone_helper.dart

Issue 2743423009: Run dartfmt on remaining unformated pkg packages (Closed)
Patch Set: Run dartfmt on remaining unformated pkg packages 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
« no previous file with comments | « pkg/testing/lib/src/test_root.dart ('k') | pkg/testing/lib/testing.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/zone_helper.dart
diff --git a/pkg/testing/lib/src/zone_helper.dart b/pkg/testing/lib/src/zone_helper.dart
index 0429260ed66549ac4a3afcdb1e2e2a6a6b120025..e679e63b1f53f171a694e400cb874d128989a595 100644
--- a/pkg/testing/lib/src/zone_helper.dart
+++ b/pkg/testing/lib/src/zone_helper.dart
@@ -5,29 +5,17 @@
/// Helper functions for running code in a Zone.
library testing.zone_helper;
-import 'dart:async' show
- Completer,
- Future,
- ZoneSpecification,
- runZoned;
+import 'dart:async' show Completer, Future, ZoneSpecification, runZoned;
-import 'dart:io' show
- exit,
- stderr;
+import 'dart:io' show exit, stderr;
-import 'dart:isolate' show
- Capability,
- Isolate,
- ReceivePort;
+import 'dart:isolate' show Capability, Isolate, ReceivePort;
-import 'log.dart' show
- logUncaughtError;
+import 'log.dart' show logUncaughtError;
-Future runGuarded(
- Future f(),
+Future runGuarded(Future f(),
{void printLineOnStdout(line),
- void handleLateError(error, StackTrace stackTrace)}) {
-
+ void handleLateError(error, StackTrace stackTrace)}) {
var printWrapper;
if (printLineOnStdout != null) {
printWrapper = (_1, _2, _3, String line) {
@@ -50,8 +38,8 @@ Future runGuarded(
} catch (_) {
// Ignored.
}
- stderr.write("$errorString\n" +
- (stackTrace == null ? "" : "$stackTrace"));
+ stderr
+ .write("$errorString\n" + (stackTrace == null ? "" : "$stackTrace"));
stderr.flush();
exit(255);
}
@@ -74,10 +62,8 @@ Future runGuarded(
Isolate.current.setErrorsFatal(false);
Isolate.current.addErrorListener(errorPort.sendPort);
return acknowledgeControlMessages(Isolate.current).then((_) {
- runZoned(
- () => new Future(f).then(completer.complete),
- zoneSpecification: specification,
- onError: handleUncaughtError);
+ runZoned(() => new Future(f).then(completer.complete),
+ zoneSpecification: specification, onError: handleUncaughtError);
return completer.future.whenComplete(() {
errorPort.close();
« no previous file with comments | « pkg/testing/lib/src/test_root.dart ('k') | pkg/testing/lib/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698