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

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

Issue 25471003: Modify tests to use Directory.systemTemp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 7 years, 2 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 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 request.response.contentLength = 100; 89 request.response.contentLength = 100;
90 request.response.write("data"); 90 request.response.write("data");
91 request.response.write("more data"); 91 request.response.write("more data");
92 completer.future.then((_) => server.close()); 92 completer.future.then((_) => server.close());
93 }); 93 });
94 94
95 var client = new HttpClient(); 95 var client = new HttpClient();
96 client.get("127.0.0.1", server.port, "/") 96 client.get("127.0.0.1", server.port, "/")
97 .then((request) => request.close()) 97 .then((request) => request.close())
98 .then((response) { 98 .then((response) {
99 // Close the (incomplete) response, now we have seen the response object . 99 // Close the (incomplete) response, now that we have seen
100 // the response object.
100 completer.complete(null); 101 completer.complete(null);
101 int errors = 0; 102 int errors = 0;
102 response.listen( 103 response.listen(
103 (data) {}, 104 (data) {},
104 onError: (error) => errors++, 105 onError: (error) => errors++,
105 onDone: () { 106 onDone: () {
106 Expect.equals(1, errors); 107 Expect.equals(1, errors);
107 asyncEnd(); 108 asyncEnd();
108 }); 109 });
109 }); 110 });
(...skipping 17 matching lines...) Expand all
127 128
128 129
129 void main() { 130 void main() {
130 testGetEmptyRequest(); 131 testGetEmptyRequest();
131 testGetDataRequest(); 132 testGetDataRequest();
132 testGetInvalidHost(); 133 testGetInvalidHost();
133 testGetServerClose(); 134 testGetServerClose();
134 testGetDataServerClose(); 135 testGetDataServerClose();
135 testPostEmptyRequest(); 136 testPostEmptyRequest();
136 } 137 }
OLDNEW
« no previous file with comments | « tests/standalone/io/file_write_as_test.dart ('k') | tests/standalone/io/http_cookie_date_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698