Chromium Code Reviews| 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() { |