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: test/web_socket_test.dart

Issue 1046573002: pkg/http_parser: format code, prepare for +6 release (Closed) Base URL: https://github.com/dart-lang/http_parser.git@master
Patch Set: cl feedback Created 5 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 | « test/media_type_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/web_socket_test.dart
diff --git a/test/web_socket_test.dart b/test/web_socket_test.dart
index 45b84d9ec759946a1e7ae375d56943255f0bbeb6..6a0849d944d9d88b47651486089362e9139c5003 100644
--- a/test/web_socket_test.dart
+++ b/test/web_socket_test.dart
@@ -22,13 +22,14 @@ void main() {
});
var client = new HttpClient();
- return client.openUrl("GET", Uri.parse("http://localhost:${server.port}"))
+ return client
+ .openUrl("GET", Uri.parse("http://localhost:${server.port}"))
.then((request) {
request.headers
- ..set("Connection", "Upgrade")
- ..set("Upgrade", "websocket")
- ..set("Sec-WebSocket-Key", "x3JJHMbDL1EzLkh9GBhXDw==")
- ..set("Sec-WebSocket-Version", "13");
+ ..set("Connection", "Upgrade")
+ ..set("Upgrade", "websocket")
+ ..set("Sec-WebSocket-Key", "x3JJHMbDL1EzLkh9GBhXDw==")
+ ..set("Sec-WebSocket-Version", "13");
return request.close();
}).then((response) => response.detachSocket()).then((socket) {
var webSocket = new CompatibleWebSocket(socket, serverSide: false);
@@ -57,10 +58,10 @@ void main() {
var response = request.response;
response.statusCode = 101;
response.headers
- ..set("Connection", "Upgrade")
- ..set("Upgrade", "websocket")
- ..set("Sec-WebSocket-Accept", CompatibleWebSocket.signKey(
- request.headers.value('Sec-WebSocket-Key')));
+ ..set("Connection", "Upgrade")
+ ..set("Upgrade", "websocket")
+ ..set("Sec-WebSocket-Accept", CompatibleWebSocket
+ .signKey(request.headers.value('Sec-WebSocket-Key')));
response.contentLength = 0;
response.detachSocket().then((socket) {
var webSocket = new CompatibleWebSocket(socket);
@@ -73,7 +74,8 @@ void main() {
});
});
- return WebSocket.connect('ws://localhost:${server.port}')
+ return WebSocket
+ .connect('ws://localhost:${server.port}')
.then((webSocket) {
var n = 0;
return webSocket.listen((message) {
« no previous file with comments | « test/media_type_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698