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

Unified Diff: tests/standalone/io/http_proxy_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/http_connection_close_test.dart ('k') | tests/standalone/io/http_redirect_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_proxy_test.dart
diff --git a/tests/standalone/io/http_proxy_test.dart b/tests/standalone/io/http_proxy_test.dart
index 8232769338e2f6a7d567067bc60f881eeaff8198..9d3190c6a0ce6684a7661d2c71fb76c2e5c73086 100644
--- a/tests/standalone/io/http_proxy_test.dart
+++ b/tests/standalone/io/http_proxy_test.dart
@@ -72,7 +72,7 @@ class ProxyServer {
requestCount++;
// Open the connection from the proxy.
HttpClientConnection conn =
- client.openUrl(request.method, new Uri.fromString(request.path));
+ client.openUrl(request.method, Uri.parse(request.path));
conn.onRequest = (HttpClientRequest clientRequest) {
// Forward all headers.
request.headers.forEach((String name, List<String> values) {
@@ -118,17 +118,17 @@ testInvalidProxy() {
// HttpClientConnection onError.
client.findProxy = (Uri uri) => "XXX";
Expect.throws(
- () => client.getUrl(new Uri.fromString("http://www.google.com/test")),
+ () => client.getUrl(Uri.parse("http://www.google.com/test")),
(e) => e is HttpException);
client.findProxy = (Uri uri) => "PROXY www.google.com";
Expect.throws(
- () => client.getUrl(new Uri.fromString("http://www.google.com/test")),
+ () => client.getUrl(Uri.parse("http://www.google.com/test")),
(e) => e is HttpException);
client.findProxy = (Uri uri) => "PROXY www.google.com:http";
Expect.throws(
- () => client.getUrl(new Uri.fromString("http://www.google.com/test")),
+ () => client.getUrl(Uri.parse("http://www.google.com/test")),
(e) => e is HttpException);
}
@@ -147,7 +147,7 @@ void testDirectProxy() {
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.contentLength = content.length;
@@ -191,7 +191,7 @@ void testProxy() {
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
client.postUrl(
- new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.outputStream.writeString(content);
@@ -238,7 +238,7 @@ void testProxyChain() {
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.contentLength = content.length;
@@ -280,7 +280,7 @@ void testRealProxy() {
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.contentLength = content.length;
« no previous file with comments | « tests/standalone/io/http_connection_close_test.dart ('k') | tests/standalone/io/http_redirect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698