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

Side by Side Diff: tests/standalone/io/http_server_test.dart

Issue 169383003: Make event-handlers edge-triggered and move socket-state to Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:async"; 5 import "dart:async";
6 import "dart:io"; 6 import "dart:io";
7 7
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 request.listen((_) {}, onError: (error) { 94 request.listen((_) {}, onError: (error) {
95 Expect.notEquals(Zone.ROOT, Zone.current); 95 Expect.notEquals(Zone.ROOT, Zone.current);
96 server.close(); 96 server.close();
97 throw error; 97 throw error;
98 }); 98 });
99 }); 99 });
100 Socket.connect("127.0.0.1", server.port).then((socket) { 100 Socket.connect("127.0.0.1", server.port).then((socket) {
101 socket.write('GET / HTTP/1.1\r\nContent-Length: 100\r\n\r\n'); 101 socket.write('GET / HTTP/1.1\r\nContent-Length: 100\r\n\r\n');
102 socket.write('some body'); 102 socket.write('some body');
103 socket.close(); 103 socket.close();
104 socket.listen(null);
104 }); 105 });
105 }); 106 });
106 }, onError: (e) { 107 }, onError: (e) {
107 asyncEnd(); 108 asyncEnd();
108 }); 109 });
109 } 110 }
110 111
111 112
112 void main() { 113 void main() {
113 testListenOn(); 114 testListenOn();
114 testHttpServerZone(); 115 testHttpServerZone();
115 testHttpServerZoneError(); 116 testHttpServerZoneError();
116 } 117 }
OLDNEW
« no previous file with comments | « tests/standalone/io/http_response_deadline_test.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698