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

Unified Diff: runtime/tests/vm/dart/hello_fuchsia_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 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 8d597f2778cc70b299f964604218b042ec55d3cb..1598f0c0b07d4a7b4387b0cf44115a72073c8668 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,11 +119,14 @@ 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);
+ });
});
{
@@ -151,8 +154,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;
@@ -171,11 +174,12 @@ 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);
});
@@ -245,8 +249,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;
@@ -265,10 +269,12 @@ 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);
+ });
});
{
@@ -300,8 +306,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;
@@ -320,10 +326,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);
});
@@ -342,7 +348,9 @@ 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) {
@@ -368,7 +376,9 @@ 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