diff options
Diffstat (limited to 'LayoutTests/fast/url/script-tests/segments.js')
-rw-r--r-- | LayoutTests/fast/url/script-tests/segments.js | 160 |
1 files changed, 80 insertions, 80 deletions
diff --git a/LayoutTests/fast/url/script-tests/segments.js b/LayoutTests/fast/url/script-tests/segments.js index 037f243..a1e5dba 100644 --- a/LayoutTests/fast/url/script-tests/segments.js +++ b/LayoutTests/fast/url/script-tests/segments.js @@ -3,95 +3,95 @@ description("Test URL segmentation"); cases = [ // [URL, [SCHEME, HOST, PORT, PATH, QUERY, REF]] ["http://user:pass@foo:21/bar;par?b#c", ["http:","foo","21","/bar;par","?b","#c"]], - ["http:foo.com", ["http:","example.org","0","/foo/foo.com","",""]], - ["\\t :foo.com \\n", ["http:","example.org","0","/foo/:foo.com","",""]], - [" foo.com ", ["http:","example.org","0","/foo/foo.com","",""]], - ["a:\\t foo.com", ["a:","","0"," foo.com","",""]], + ["http:foo.com", ["http:","example.org","","/foo/foo.com","",""]], + ["\\t :foo.com \\n", ["http:","example.org","","/foo/:foo.com","",""]], + [" foo.com ", ["http:","example.org","","/foo/foo.com","",""]], + ["a:\\t foo.com", ["a:","",""," foo.com","",""]], ["http://f:21/ b ? d # e ", ["http:","f","21","/%20b%20","?%20d%20","# e"]], - ["http://f:/c", ["http:","f","0","/c","",""]], + ["http://f:/c", ["http:","f","","/c","",""]], ["http://f:0/c", ["http:","f","0","/c","",""]], ["http://f:00000000000000/c", ["http:","f","0","/c","",""]], ["http://f:00000000000000000000080/c", ["http:","f","0","/c","",""]], - ["http://f:b/c", [":","","0","","",""]], - ["http://f: /c", [":","","0","","",""]], - ["http://f:\\n/c", [":","","0","","",""]], - ["http://f:fifty-two/c", [":","","0","","",""]], + ["http://f:b/c", [":","","","","",""]], + ["http://f: /c", [":","","","","",""]], + ["http://f:\\n/c", [":","","","","",""]], + ["http://f:fifty-two/c", [":","","","","",""]], ["http://f:999999/c", [":","","0","","",""]], - ["http://f: 21 / b ? d # e ", [":","","0","","",""]], - ["", ["http:","example.org","0","/foo/bar","",""]], - [" \\t", ["http:","example.org","0","/foo/bar","",""]], - [":foo.com/", ["http:","example.org","0","/foo/:foo.com/","",""]], - [":foo.com\\\\", ["http:","example.org","0","/foo/:foo.com/","",""]], - [":", ["http:","example.org","0","/foo/:","",""]], - [":a", ["http:","example.org","0","/foo/:a","",""]], - [":/", ["http:","example.org","0","/foo/:/","",""]], - [":\\\\", ["http:","example.org","0","/foo/:/","",""]], - [":#", ["http:","example.org","0","/foo/:","",""]], - ["#", ["http:","example.org","0","/foo/bar","",""]], - ["#/", ["http:","example.org","0","/foo/bar","","#/"]], - ["#\\\\", ["http:","example.org","0","/foo/bar","","#\\\\"]], - ["#;?", ["http:","example.org","0","/foo/bar","","#;?"]], - ["?", ["http:","example.org","0","/foo/bar","",""]], - ["/", ["http:","example.org","0","/","",""]], - [":23", ["http:","example.org","0","/foo/:23","",""]], - ["/:23", ["http:","example.org","0","/:23","",""]], - ["//", [":","","0","","",""]], - ["::", ["http:","example.org","0","/foo/::","",""]], - ["::23", ["http:","example.org","0","/foo/::23","",""]], - ["foo://", ["foo:","","0","//","",""]], + ["http://f: 21 / b ? d # e ", [":","","","","",""]], + ["", ["http:","example.org","","/foo/bar","",""]], + [" \\t", ["http:","example.org","","/foo/bar","",""]], + [":foo.com/", ["http:","example.org","","/foo/:foo.com/","",""]], + [":foo.com\\\\", ["http:","example.org","","/foo/:foo.com/","",""]], + [":", ["http:","example.org","","/foo/:","",""]], + [":a", ["http:","example.org","","/foo/:a","",""]], + [":/", ["http:","example.org","","/foo/:/","",""]], + [":\\\\", ["http:","example.org","","/foo/:/","",""]], + [":#", ["http:","example.org","","/foo/:","",""]], + ["#", ["http:","example.org","","/foo/bar","",""]], + ["#/", ["http:","example.org","","/foo/bar","","#/"]], + ["#\\\\", ["http:","example.org","","/foo/bar","","#\\\\"]], + ["#;?", ["http:","example.org","","/foo/bar","","#;?"]], + ["?", ["http:","example.org","","/foo/bar","",""]], + ["/", ["http:","example.org","","/","",""]], + [":23", ["http:","example.org","","/foo/:23","",""]], + ["/:23", ["http:","example.org","","/:23","",""]], + ["//", [":","","","","",""]], + ["::", ["http:","example.org","","/foo/::","",""]], + ["::23", ["http:","example.org","","/foo/::23","",""]], + ["foo://", ["foo:","","","//","",""]], ["http://a:b@c:29/d", ["http:","c","29","/d","",""]], - ["http::@c:29", ["http:","example.org","0","/foo/:@c:29","",""]], + ["http::@c:29", ["http:","example.org","","/foo/:@c:29","",""]], ["http://&a:foo(b]c@d:2/", ["http:","d","2","/","",""]], ["http://::@c@d:2", ["http:","d","2","/","",""]], - ["http://foo.com:b@d/", ["http:","d","0","/","",""]], - ["http://foo.com/\\\\@", ["http:","foo.com","0","//@","",""]], - ["http:\\\\\\\\foo.com\\\\", ["http:","foo.com","0","/","",""]], - ["http:\\\\\\\\a\\\\b:c\\\\d@foo.com\\\\", ["http:","a","0","/b:c/d@foo.com/","",""]], - ["foo:/", ["foo:","","0","/","",""]], - ["foo:/bar.com/", ["foo:","","0","/bar.com/","",""]], - ["foo://///////", ["foo:","","0","/////////","",""]], - ["foo://///////bar.com/", ["foo:","","0","/////////bar.com/","",""]], - ["foo:////://///", ["foo:","","0","////://///","",""]], - ["c:/foo", ["c:","","0","/foo","",""]], - ["//foo/bar", ["http:","foo","0","/bar","",""]], - ["http://foo/path;a??e#f#g", ["http:","foo","0","/path;a","??e","#f#g"]], - ["http://foo/abcd?efgh?ijkl", ["http:","foo","0","/abcd","?efgh?ijkl",""]], - ["http://foo/abcd#foo?bar", ["http:","foo","0","/abcd","","#foo?bar"]], - ["[61:24:74]:98", ["http:","example.org","0","/foo/[61:24:74]:98","",""]], + ["http://foo.com:b@d/", ["http:","d","","/","",""]], + ["http://foo.com/\\\\@", ["http:","foo.com","","//@","",""]], + ["http:\\\\\\\\foo.com\\\\", ["http:","foo.com","","/","",""]], + ["http:\\\\\\\\a\\\\b:c\\\\d@foo.com\\\\", ["http:","a","","/b:c/d@foo.com/","",""]], + ["foo:/", ["foo:","","","/","",""]], + ["foo:/bar.com/", ["foo:","","","/bar.com/","",""]], + ["foo://///////", ["foo:","","","/////////","",""]], + ["foo://///////bar.com/", ["foo:","","","/////////bar.com/","",""]], + ["foo:////://///", ["foo:","","","////://///","",""]], + ["c:/foo", ["c:","","","/foo","",""]], + ["//foo/bar", ["http:","foo","","/bar","",""]], + ["http://foo/path;a??e#f#g", ["http:","foo","","/path;a","??e","#f#g"]], + ["http://foo/abcd?efgh?ijkl", ["http:","foo","","/abcd","?efgh?ijkl",""]], + ["http://foo/abcd#foo?bar", ["http:","foo","","/abcd","","#foo?bar"]], + ["[61:24:74]:98", ["http:","example.org","","/foo/[61:24:74]:98","",""]], ["http://[61:27]:98", [":","","0","","",""]], - ["http:[61:27]/:foo", ["http:","example.org","0","/foo/[61:27]/:foo","",""]], - ["http://[1::2]:3:4", [":","","0","","",""]], - ["http://2001::1", [":","","0","","",""]], - ["http://[2001::1", [":","","0","","",""]], - ["http://2001::1]", [":","","0","","",""]], - ["http://2001::1]:80", [":","","0","","",""]], - ["http://[2001::1]", ["http:","[2001::1]","0","/","",""]], - ["http://[2001::1]:80", ["http:","[2001::1]","0","/","",""]], - ["http://[[::]]", [":","","0","","",""]], - ["http:/example.com/", ["http:","example.org","0","/example.com/","",""]], - ["ftp:/example.com/", ["ftp:","example.com","0","/","",""]], - ["https:/example.com/", ["https:","example.com","0","/","",""]], - ["madeupscheme:/example.com/", ["madeupscheme:","","0","/example.com/","",""]], - ["file:/example.com/", ["file:","","0","/example.com/","",""]], - ["ftps:/example.com/", ["ftps:","","0","/example.com/","",""]], - ["gopher:/example.com/", ["gopher:","example.com","0","/","",""]], - ["ws:/example.com/", ["ws:","example.com","0","/","",""]], - ["wss:/example.com/", ["wss:","example.com","0","/","",""]], - ["data:/example.com/", ["data:","","0","/example.com/","",""]], - ["javascript:/example.com/", ["javascript:","","0","/example.com/","",""]], - ["mailto:/example.com/", ["mailto:","","0","/example.com/","",""]], - ["http:example.com/", ["http:","example.org","0","/foo/example.com/","",""]], - ["ftp:example.com/", ["ftp:","example.com","0","/","",""]], - ["https:example.com/", ["https:","example.com","0","/","",""]], - ["madeupscheme:example.com/", ["madeupscheme:","","0","example.com/","",""]], - ["file:example.com/", ["file:","","0","/example.com/","",""]], - ["ftps:example.com/", ["ftps:","","0","example.com/","",""]], - ["gopher:example.com/", ["gopher:","example.com","0","/","",""]], - ["ws:example.com/", ["ws:","example.com","0","/","",""]], - ["wss:example.com/", ["wss:","example.com","0","/","",""]], - ["data:example.com/", ["data:","","0","example.com/","",""]], - ["javascript:example.com/", ["javascript:","","0","example.com/","",""]], - ["mailto:example.com/", ["mailto:","","0","example.com/","",""]], + ["http:[61:27]/:foo", ["http:","example.org","","/foo/[61:27]/:foo","",""]], + ["http://[1::2]:3:4", [":","","","","",""]], + ["http://2001::1", [":","","","","",""]], + ["http://[2001::1", [":","","","","",""]], + ["http://2001::1]", [":","","","","",""]], + ["http://2001::1]:80", [":","","","","",""]], + ["http://[2001::1]", ["http:","[2001::1]","","/","",""]], + ["http://[2001::1]:80", ["http:","[2001::1]","","/","",""]], + ["http://[[::]]", [":","","","","",""]], + ["http:/example.com/", ["http:","example.org","","/example.com/","",""]], + ["ftp:/example.com/", ["ftp:","example.com","","/","",""]], + ["https:/example.com/", ["https:","example.com","","/","",""]], + ["madeupscheme:/example.com/", ["madeupscheme:","","","/example.com/","",""]], + ["file:/example.com/", ["file:","","","/example.com/","",""]], + ["ftps:/example.com/", ["ftps:","","","/example.com/","",""]], + ["gopher:/example.com/", ["gopher:","example.com","","/","",""]], + ["ws:/example.com/", ["ws:","example.com","","/","",""]], + ["wss:/example.com/", ["wss:","example.com","","/","",""]], + ["data:/example.com/", ["data:","","","/example.com/","",""]], + ["javascript:/example.com/", ["javascript:","","","/example.com/","",""]], + ["mailto:/example.com/", ["mailto:","","","/example.com/","",""]], + ["http:example.com/", ["http:","example.org","","/foo/example.com/","",""]], + ["ftp:example.com/", ["ftp:","example.com","","/","",""]], + ["https:example.com/", ["https:","example.com","","/","",""]], + ["madeupscheme:example.com/", ["madeupscheme:","","","example.com/","",""]], + ["file:example.com/", ["file:","","","/example.com/","",""]], + ["ftps:example.com/", ["ftps:","","","example.com/","",""]], + ["gopher:example.com/", ["gopher:","example.com","","/","",""]], + ["ws:example.com/", ["ws:","example.com","","/","",""]], + ["wss:example.com/", ["wss:","example.com","","/","",""]], + ["data:example.com/", ["data:","","","example.com/","",""]], + ["javascript:example.com/", ["javascript:","","","example.com/","",""]], + ["mailto:example.com/", ["mailto:","","","example.com/","",""]], ]; var originalBaseURL = canonicalize("."); |