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

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

Issue 12052038: Rename new Uri.fromString to Uri.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload because of Error. Created 7 years, 11 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
« no previous file with comments | « tests/standalone/io/web_socket_secure_test.dart ('k') | tests/utils/uri_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 5
6 import "dart:async"; 6 import "dart:async";
7 import "dart:io"; 7 import "dart:io";
8 import "dart:isolate"; 8 import "dart:isolate";
9 import "dart:scalarlist"; 9 import "dart:scalarlist";
10 import "dart:uri"; 10 import "dart:uri";
(...skipping 21 matching lines...) Expand all
32 server.listen(SERVER_ADDRESS, 32 server.listen(SERVER_ADDRESS,
33 0, 33 0,
34 backlog: backlog, 34 backlog: backlog,
35 certificate_name: "CN=$HOST_NAME"); 35 certificate_name: "CN=$HOST_NAME");
36 return server; 36 return server;
37 } 37 }
38 38
39 WebSocketClientConnection createClient(int port, 39 WebSocketClientConnection createClient(int port,
40 {bool followRedirects, 40 {bool followRedirects,
41 String method: "GET"}) { 41 String method: "GET"}) {
42 HttpClientConnection conn = client.openUrl(method, new Uri.fromString( 42 HttpClientConnection conn = client.openUrl(method, Uri.parse(
43 '${secure ? "https" : "http"}://$HOST_NAME:$port/')); 43 '${secure ? "https" : "http"}://$HOST_NAME:$port/'));
44 if (followRedirects != null) { 44 if (followRedirects != null) {
45 conn.followRedirects = followRedirects; 45 conn.followRedirects = followRedirects;
46 } 46 }
47 return new WebSocketClientConnection(conn); 47 return new WebSocketClientConnection(conn);
48 } 48 }
49 49
50 void testRequestResponseClientCloses( 50 void testRequestResponseClientCloses(
51 int totalConnections, int closeStatus, String closeReason) { 51 int totalConnections, int closeStatus, String closeReason) {
52 HttpServer server = createServer(backlog: totalConnections); 52 HttpServer server = createServer(backlog: totalConnections);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 SecureSocket.initialize(database: testPkcertDatabase.toNativePath(), 370 SecureSocket.initialize(database: testPkcertDatabase.toNativePath(),
371 password: "dartdart"); 371 password: "dartdart");
372 } 372 }
373 373
374 374
375 main() { 375 main() {
376 new SecurityConfiguration(secure: false).runTests(); 376 new SecurityConfiguration(secure: false).runTests();
377 initializeSSL(); 377 initializeSSL();
378 new SecurityConfiguration(secure: true).runTests(); 378 new SecurityConfiguration(secure: true).runTests();
379 } 379 }
OLDNEW
« no previous file with comments | « tests/standalone/io/web_socket_secure_test.dart ('k') | tests/utils/uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698