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

Unified Diff: tests/corelib/uri_test.dart

Issue 2158933003: Fix for uri replace whene uri has fragment. Was adding a second '#'. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 5 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 a9166be3c11d0dd205f6be6fbfef99b9e504cc00..3d24e2daa9bea2b13edaf0f5a1804216a5b67247 100644
--- a/tests/corelib/uri_test.dart
+++ b/tests/corelib/uri_test.dart
@@ -32,6 +32,11 @@ testUri(String uriText, bool isAbsolute) {
Expect.equals(uri,
Uri.parse(uriText + "#fragment").removeFragment());
}
+
+ // Test uri.replace on uri with fragment
+ uri = Uri.parse('http://hello.com/fake#fragment');
+ uri = uri.replace(path: "D/E/E");
+ Expect.stringEquals('http://hello.com/D/E/E#fragment', uri.toString());
}
testEncodeDecode(String orig, String encoded) {
« 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