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

Unified Diff: tests/corelib/uri_test.dart

Issue 438303002: Revert "Add Uri.replace which creates a new Uri with the same fields as the original, but with some… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | « sdk/lib/core/uri.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/uri_test.dart
diff --git a/tests/corelib/uri_test.dart b/tests/corelib/uri_test.dart
index 8942d3cecd6559122660f2c3426a4fa22ca9f819..7d8a6bf170c8a00ecfae58f9d3b7f726094a03a7 100644
--- a/tests/corelib/uri_test.dart
+++ b/tests/corelib/uri_test.dart
@@ -365,65 +365,6 @@ void testNormalization() {
query: "", fragment: "").toString());
}
-void testReplace() {
- var uris = [
- Uri.parse(""),
- Uri.parse("a://b@c:4/e/f?g#h"),
- Uri.parse("$SCHEMECHAR://$USERINFOCHAR@$REGNAMECHAR:$DIGIT/$PCHAR/$PCHAR"
- "?$QUERYCHAR#$QUERYCHAR"),
- ];
- for (var uri1 in uris) {
- for (var uri2 in uris) {
- if (identical(uri1, uri2)) continue;
- var scheme = uri1.scheme;
- var userInfo = uri1.userInfo;
- var host = uri1.host;
- var port = uri1.port;
- var path = uri1.path;
- var query = uri1.query;
- var fragment = uri1.fragment;
-
- var tmp1 = uri1;
- test() {
- var tmp2 = new Uri(scheme: scheme, userInfo: userInfo, host: host,
- port: port, path: path,
- query: query, fragment: fragment);
- Expect.equals(tmp1, tmp2);
- }
-
- test();
-
- scheme = uri2.scheme;
- tmp1 = tmp1.replace(scheme: scheme);
- test();
-
- userInfo = uri2.userInfo;
- tmp1 = tmp1.replace(userInfo: userInfo);
- test();
-
- host = uri2.host;
- tmp1 = tmp1.replace(host: host);
- test();
-
- port = uri2.port;
- tmp1 = tmp1.replace(port: port);
- test();
-
- path = uri2.path;
- tmp1 = tmp1.replace(path: path);
- test();
-
- query = uri2.query;
- tmp1 = tmp1.replace(query: query);
- test();
-
- fragment = uri2.fragment;
- tmp1 = tmp1.replace(fragment: fragment);
- test();
- }
- }
-}
-
main() {
testUri("http:", true);
testUri("file:///", true);
@@ -588,7 +529,6 @@ main() {
testValidCharacters();
testInvalidUrls();
testNormalization();
- testReplace();
}
String dump(Uri uri) {
« no previous file with comments | « sdk/lib/core/uri.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698