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

Unified Diff: tests/standalone/io/web_socket_pipe_test.dart

Issue 23756003: Use the same IP address for both server and client in web_socket_pipe_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/web_socket_pipe_test.dart
diff --git a/tests/standalone/io/web_socket_pipe_test.dart b/tests/standalone/io/web_socket_pipe_test.dart
index 9c1bbac914abbbaa41e1d360cab4040a69830ac8..269abf381ed8cb53ce3efd8546522d087d93917f 100644
--- a/tests/standalone/io/web_socket_pipe_test.dart
+++ b/tests/standalone/io/web_socket_pipe_test.dart
@@ -27,18 +27,13 @@ testPipe({int messages, bool transform}) {
HttpServer.bind("127.0.0.1", 0).then((server) {
server.listen((request) {
WebSocketTransformer.upgrade(request).then((websocket) {
- Future done;
- if (transform) {
- done = websocket
- .transform(new ReverseStringTransformer())
- .pipe(websocket);
- } else {
- done = websocket.pipe(websocket);
- }
- done.then((_) => server.close());
+ (transform ? websocket.transform(new ReverseStringTransformer())
+ : websocket)
+ .pipe(websocket)
+ .then((_) => server.close());
});
});
- WebSocket.connect("ws://localhost:${server.port}/").then((client) {
+ WebSocket.connect("ws://127.0.0.1:${server.port}/").then((client) {
var count = 0;
next() {
if (count < messages) {
@@ -49,7 +44,8 @@ testPipe({int messages, bool transform}) {
}
next();
- client.listen((data) {
+ client.listen(
+ (data) {
Bill Hesse 2013/09/02 11:41:31 I still think this is wrong - in this case, (data)
Søren Gjesse 2013/10/28 11:33:38 Done.
count++;
if (transform) {
Expect.equals("olleH", data);
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698