1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
6 <script src=
"resources/utilities.js"></script>
7 <!-- Set the base so that the current URL does not affect the tests. -->
13 description("This ensure we do not mess up the bytes when an URL is partially parsed and is invalid.")
15 // Those are all invalid URLs. They should not be partially modified by the parser.
17 // Empty Authority for a standard hierachical URL.
26 'foo://tête à tête@host/',
27 'foo://user:tête à tête@host/',
29 ' foo://user:<>@host/ ',
30 'foo://user:password@[xxxxx]/tête à tête/',
32 // The '?' is a path separator and make sure the hostname is not encoded in punicode. The hostname is an invalid IPV6 hostname.
33 'foo://user:password@[?tête à tête/',
34 'foo://user:password@[?tête à tête]/',
35 'foo://user:password@host:tête à tête/',
36 'foo://user:password@host:80tête à tête',
37 'foo://user:password@host:tête à tête/',
38 'foo://user:password@host:80tête à tête',
39 // The schemes "ws:", "ftp:", "http:", "https:", "gother:" take a shortcut during parsing so we test them separately.
47 for (var i
= 0; i
< testSet
.length
; ++i
) {
48 src
= canonicalize(testSet
[i
]);
49 expected
= testSet
[i
].trim();
50 shouldBe('src', 'expected');
53 successfullyParsed
= true;