| CONSOLE MESSAGE: Blocked setting data:foobar as the base URL because it does not have an allowed scheme. |
| CONSOLE MESSAGE: Blocked setting data:foobar as the base URL because it does not have an allowed scheme. |
| CONSOLE MESSAGE: Blocked setting data:foobar as the base URL because it does not have an allowed scheme. |
| CONSOLE MESSAGE: Blocked setting data:foobar as the base URL because it does not have an allowed scheme. |
| CONSOLE MESSAGE: Blocked setting data:foobar as the base URL because it does not have an allowed scheme. |
| CONSOLE MESSAGE: Blocked setting data:asdf as the base URL because it does not have an allowed scheme. |
| Test resolution of relative URLs. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS canonicalize('http://another/') is 'http://another/' |
| PASS canonicalize('http:////another/') is 'http://another/' |
| PASS canonicalize('') is 'http://foo/bar' |
| PASS canonicalize('') is 'http://foo/bar' |
| PASS canonicalize('') is 'http://foo/bar' |
| PASS canonicalize(' another ') is 'http://foo/another' |
| PASS canonicalize(' . ') is 'http://foo/' |
| PASS canonicalize(' ') is 'http://foo/bar' |
| PASS canonicalize('http:path') is 'http://host/path' |
| PASS canonicalize('http:path') is 'http://host/a/path' |
| PASS canonicalize('http:/path') is 'http://host/path' |
| PASS canonicalize('HTTP:/path') is 'http://host/path' |
| PASS canonicalize('https:host2') is 'https://host2/' |
| PASS canonicalize('htto:/host2') is 'htto:/host2' |
| PASS canonicalize('/b/c/d') is 'http://host/b/c/d' |
| PASS canonicalize('\\b\\c\\d') is 'http://host/b/c/d' |
| PASS canonicalize('/b/../c') is 'http://host/c' |
| PASS canonicalize('/b/../c') is 'http://host/c' |
| PASS canonicalize('\\b/../c?x#y') is 'http://host/c?x#y' |
| PASS canonicalize('/b/../c?x#y') is 'http://host/c?x#y' |
| PASS canonicalize('b') is 'http://host/b' |
| PASS canonicalize('bc/de') is 'http://host/bc/de' |
| PASS canonicalize('bc/de?query#ref') is 'http://host/a/bc/de?query#ref' |
| PASS canonicalize('.') is 'http://host/a/' |
| PASS canonicalize('..') is 'http://host/' |
| PASS canonicalize('./..') is 'http://host/' |
| PASS canonicalize('../.') is 'http://host/' |
| PASS canonicalize('././.') is 'http://host/a/' |
| PASS canonicalize('../../../foo') is 'http://host/foo' |
| PASS canonicalize('?foo=bar') is 'http://host/a?foo=bar' |
| PASS canonicalize('?') is 'http://host/a?' |
| PASS canonicalize('?foo=bar#com') is 'http://host/a?foo=bar#com' |
| PASS canonicalize('#ref') is 'http://host/a#ref' |
| PASS canonicalize('#') is 'http://host/a#' |
| PASS canonicalize('#bye') is 'http://host/a?foo=bar#bye' |
| PASS canonicalize('baz.html') is 'file:///.../baz.html' |
| PASS canonicalize('data:baz') is 'data:baz' |
| PASS canonicalize('data:/base') is 'data:/base' |
| PASS canonicalize('http://host/') is 'http://host/' |
| PASS canonicalize('http:host') is 'http://host/' |
| PASS canonicalize('./asd:fgh') is 'http://foo/asd:fgh' |
| PASS canonicalize(':foo') is 'http://foo/:foo' |
| PASS canonicalize(' hello world') is 'http://foo/hello%20world' |
| PASS canonicalize(':foo') is 'file:///.../:foo' |
| PASS canonicalize(';foo') is 'http://host/;foo' |
| PASS canonicalize(';foo') is 'http://host/;foo' |
| PASS canonicalize(';/../bar') is 'http://host/bar' |
| PASS canonicalize('//another') is 'http://another/' |
| PASS canonicalize('//another/path?query#ref') is 'http://another/path?query#ref' |
| PASS canonicalize('///another/path') is 'http://another/path' |
| PASS canonicalize('//Another\\path') is 'http://another/path' |
| FAIL canonicalize('//') should be http:. Was //. |
| PASS canonicalize('\\/another/path') is 'http://another/path' |
| PASS canonicalize('/\\Another\\path') is 'http://another/path' |
| PASS successfullyParsed is true |
| Some tests failed. |
| |
| TEST COMPLETE |
| |