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

Unified Diff: runtime/tests/vm/dart/hello_fuchsia_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/tests/vm/dart/hello_fuchsia_test.dart
diff --git a/runtime/tests/vm/dart/hello_fuchsia_test.dart b/runtime/tests/vm/dart/hello_fuchsia_test.dart
index 1598f0c0b07d4a7b4387b0cf44115a72073c8668..8d597f2778cc70b299f964604218b042ec55d3cb 100644
--- a/runtime/tests/vm/dart/hello_fuchsia_test.dart
+++ b/runtime/tests/vm/dart/hello_fuchsia_test.dart
@@ -99,8 +99,8 @@ testSimpleReadWriteClose() async {
break;
case RawSocketEvent.WRITE:
assert(!client.writeEventsEnabled);
- bytesWritten +=
- client.write(data, bytesWritten, data.length - bytesWritten);
+ bytesWritten += client.write(
+ data, bytesWritten, data.length - bytesWritten);
print("client WRITE event: $bytesWritten written");
if (bytesWritten < data.length) {
client.writeEventsEnabled = true;
@@ -119,14 +119,11 @@ testSimpleReadWriteClose() async {
print("client CLOSED event");
closedEventReceived = true;
break;
- default:
- throw "Unexpected event $event";
+ default: throw "Unexpected event $event";
}
- }, onError: (e) {
- print("client ERROR $e");
- }, onDone: () {
- assert(closedEventReceived);
- });
+ },
+ onError: (e) { print("client ERROR $e"); },
+ onDone: () {assert(closedEventReceived);});
});
{
@@ -154,8 +151,8 @@ testSimpleReadWriteClose() async {
case RawSocketEvent.WRITE:
assert(bytesRead == 0);
assert(!socket.writeEventsEnabled);
- bytesWritten +=
- socket.write(data, bytesWritten, data.length - bytesWritten);
+ bytesWritten += socket.write(
+ data, bytesWritten, data.length - bytesWritten);
print("server WRITE event: ${bytesWritten} written");
if (bytesWritten < data.length) {
socket.writeEventsEnabled = true;
@@ -174,12 +171,11 @@ testSimpleReadWriteClose() async {
print("server CLOSED event");
closedEventReceived = true;
break;
- default:
- throw "Unexpected event $event";
+ default: throw "Unexpected event $event";
}
- }, onError: (e) {
- print("server ERROR $e");
- }, onDone: () {
+ },
+ onError: (e) { print("server ERROR $e"); },
+ onDone: () {
assert(closedEventReceived);
completer.complete(null);
});
@@ -249,8 +245,8 @@ testSimpleReadWriteShutdown({bool dropReads}) async {
break;
case RawSocketEvent.WRITE:
assert(!client.writeEventsEnabled);
- bytesWritten +=
- client.write(data, bytesWritten, data.length - bytesWritten);
+ bytesWritten += client.write(
+ data, bytesWritten, data.length - bytesWritten);
print("client WRITE event: $bytesWritten written");
if (bytesWritten < data.length) {
client.writeEventsEnabled = true;
@@ -269,12 +265,10 @@ testSimpleReadWriteShutdown({bool dropReads}) async {
print("client CLOSED event");
closedEventReceived = true;
break;
- default:
- throw "Unexpected event $event";
+ default: throw "Unexpected event $event";
}
- }, onDone: () {
- assert(closedEventReceived);
- });
+ },
+ onDone: () {assert(closedEventReceived);});
});
{
@@ -306,8 +300,8 @@ testSimpleReadWriteShutdown({bool dropReads}) async {
case RawSocketEvent.WRITE:
assert(bytesRead == 0);
assert(!socket.writeEventsEnabled);
- bytesWritten +=
- socket.write(data, bytesWritten, data.length - bytesWritten);
+ bytesWritten += socket.write(
+ data, bytesWritten, data.length - bytesWritten);
print("server WRITE event: ${bytesWritten} written");
if (bytesWritten < data.length) {
socket.writeEventsEnabled = true;
@@ -326,10 +320,10 @@ testSimpleReadWriteShutdown({bool dropReads}) async {
print("server CLOSED event");
closedEventReceived = true;
break;
- default:
- throw "Unexpected event $event";
+ default: throw "Unexpected event $event";
}
- }, onDone: () {
+ },
+ onDone: () {
assert(closedEventReceived);
completer.complete(null);
});
@@ -348,9 +342,7 @@ Future testGoogleHttp(SecurityContext context, String outcome) async {
request.followRedirects = false;
var response = await request.close();
assert('pass' == outcome);
- try {
- await response.drain();
- } catch (e) {
+ try { await response.drain(); } catch (e) {
print('drain failed: $e');
}
} catch (e) {
@@ -376,9 +368,7 @@ Future testGoogleHttps(SecurityContext context, String outcome) async {
request.followRedirects = false;
var response = await request.close();
assert('pass' == outcome);
- try {
- await response.drain();
- } catch (e) {
+ try { await response.drain(); } catch (e) {
print('drain failed: $e');
}
} catch (e) {
« no previous file with comments | « runtime/tests/vm/dart/double_materialize_test.dart ('k') | runtime/tests/vm/dart/inline_stack_frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698