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

Unified Diff: LayoutTests/fast/domurl/url-constructor.html

Issue 331313011: Switch URL and URLUtils interfaces over to use ScalarValueString. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | LayoutTests/fast/domurl/url-hash.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/domurl/url-constructor.html
diff --git a/LayoutTests/fast/domurl/url-constructor.html b/LayoutTests/fast/domurl/url-constructor.html
index 0205a12c3016bcaeed307e30334ac3eddb0b243a..0697a6ba77bd69e11454ef9d23b1ef374d903a33 100644
--- a/LayoutTests/fast/domurl/url-constructor.html
+++ b/LayoutTests/fast/domurl/url-constructor.html
@@ -14,6 +14,8 @@ function assertThrows(func, expected) {
assert_true(false, 'Expected an exception with string: ' + expected);
}
+var encodedReplacementCharacter = encodeURIComponent('\ufffd');
arv (Not doing code reviews) 2014/06/23 16:12:01 Since this is only used in one place, consider mov
sof 2014/06/23 19:02:48 Certainly; moved it next to its use.
+
test(function() {
assert_equals(new URL('http://www.domain.com/a/b').toString(), 'http://www.domain.com/a/b');
assert_equals(new URL('/c/d', 'http://www.domain.com/a/b').toString(), 'http://www.domain.com/c/d');
@@ -21,6 +23,9 @@ test(function() {
var base = new URL('http://www.domain.com/a/b');
assert_equals(new URL('b/c', base).toString(), 'http://www.domain.com/a/b/c');
+
+ // Unmatched surrogate handling
+ assert_equals(new URL('b/c', 'http://www.domain.com/\ud801/b').toString(), 'http://www.domain.com/' + encodedReplacementCharacter + '/b/c');
}, 'Valid URLs');
test(function() {
« no previous file with comments | « no previous file | LayoutTests/fast/domurl/url-hash.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698