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

Side by Side Diff: tests/standalone/io/web_socket_no_secure_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
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 // TODO(7157): Remove this test once the bug is fixed. 6 // TODO(7157): Remove this test once the bug is fixed.
7 // This is a copy of web_socket_test.dart with the secure connection 7 // This is a copy of web_socket_test.dart with the secure connection
8 // tests disabled, so it does not crash on Windows. 8 // tests disabled, so it does not crash on Windows.
9 import "dart:async"; 9 import "dart:async";
10 import "dart:io"; 10 import "dart:io";
(...skipping 24 matching lines...) Expand all
35 server.listen(SERVER_ADDRESS, 35 server.listen(SERVER_ADDRESS,
36 0, 36 0,
37 backlog: backlog, 37 backlog: backlog,
38 certificate_name: "CN=$HOST_NAME"); 38 certificate_name: "CN=$HOST_NAME");
39 return server; 39 return server;
40 } 40 }
41 41
42 WebSocketClientConnection createClient(int port, 42 WebSocketClientConnection createClient(int port,
43 {bool followRedirects, 43 {bool followRedirects,
44 String method: "GET"}) { 44 String method: "GET"}) {
45 HttpClientConnection conn = client.openUrl(method, new Uri.fromString( 45 HttpClientConnection conn = client.openUrl(method, Uri.parse(
46 '${secure ? "https" : "http"}://$HOST_NAME:$port/')); 46 '${secure ? "https" : "http"}://$HOST_NAME:$port/'));
47 if (followRedirects != null) { 47 if (followRedirects != null) {
48 conn.followRedirects = followRedirects; 48 conn.followRedirects = followRedirects;
49 } 49 }
50 return new WebSocketClientConnection(conn); 50 return new WebSocketClientConnection(conn);
51 } 51 }
52 52
53 void testRequestResponseClientCloses( 53 void testRequestResponseClientCloses(
54 int totalConnections, int closeStatus, String closeReason) { 54 int totalConnections, int closeStatus, String closeReason) {
55 HttpServer server = createServer(backlog: totalConnections); 55 HttpServer server = createServer(backlog: totalConnections);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 var testPkcertDatabase = 371 var testPkcertDatabase =
372 new Path(new Options().script).directoryPath.append("pkcert/"); 372 new Path(new Options().script).directoryPath.append("pkcert/");
373 SecureSocket.initialize(database: testPkcertDatabase.toNativePath(), 373 SecureSocket.initialize(database: testPkcertDatabase.toNativePath(),
374 password: "dartdart"); 374 password: "dartdart");
375 } 375 }
376 376
377 377
378 main() { 378 main() {
379 new SecurityConfiguration(secure: false).runTests(); 379 new SecurityConfiguration(secure: false).runTests();
380 } 380 }
OLDNEW
« no previous file with comments | « tests/standalone/io/secure_no_builtin_roots_test.dart ('k') | tests/standalone/io/web_socket_secure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698