URI parsing/resolving tests

Please send feedback to julian.reschke@gmx.de.

Introduction

RFC 3986: "Uniform Resource Identifier (URI): Generic Syntax" defines not only the URI syntax, but also various operations:

  1. Parsing a string into URI components using a Regular Expression (see Appendix B). Note that this algorithm is a reformulation of what the normative ABNF defines, and as such is supposed to process valid URI references exactly as defined by the ABNF (if it does not, an erratum should be reported; see RFC Editor Errata Page for RFC 3986). Further note that the same regular Expression can be used for IRIs as well, as the delimiter characters are exactly the same.
  2. Resolving a URI reference against a base URI (see Section 5).

This document collects a set of test cases, and shows how they are parsed into components, and also how they get resolved against a set of test base URIs (to add more tests, please provide feedback!).

The algorithms are (hopefully) faithful implementations of what RFC 3986 defines, using XSLT 2.0. This page is generated from an XML source, uris.xml, transformed by Saxon using uris.xslt.

Test Cases

RFC3986

Test cases from RFC 3986.

rfc3986-1 <http://a/b/c/d;p?q>

(source)

http://a/b/c/d;p?q

http://a/b/c/d;p?q resolved against http://a/b/c/d;p?q yields: http://a/b/c/d;p?q

http://a/b/c/d;p?q resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: http://a/b/c/d;p?q

rfc3986-2 <g:h>

(source)

g:h

g:h resolved against http://a/b/c/d;p?q yields: g:h

g:h resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: g:h

rfc3986-3 <>

(source)

resolved against http://a/b/c/d;p?q yields: http://a/b/c/d;p?q

resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/plain;charset=iso-8859-7,%be%fg%be

rfc3986-4 <g>

(source)

g

g resolved against http://a/b/c/d;p?q yields: http://a/b/c/g

g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g

rfc3986-5 <./g>

(source)

./g

./g resolved against http://a/b/c/d;p?q yields: http://a/b/c/g

./g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g

rfc3986-6 <g/>

(source)

g/

g/ resolved against http://a/b/c/d;p?q yields: http://a/b/c/g/

g/ resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g/

rfc3986-7 </g>

(source)

/g

/g resolved against http://a/b/c/d;p?q yields: http://a/g

/g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-8 <//g>

(source)

//g

//g resolved against http://a/b/c/d;p?q yields: http://g

//g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data://g

rfc3986-9 <?y>

(source)

?y

?y resolved against http://a/b/c/d;p?q yields: http://a/b/c/d;p?y

?y resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/plain;charset=iso-8859-7,%be%fg%be?y

rfc3986-10 <g?y>

(source)

g?y

g?y resolved against http://a/b/c/d;p?q yields: http://a/b/c/g?y

g?y resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g?y

rfc3986-11 <#s>

(source)

#s

#s resolved against http://a/b/c/d;p?q yields: http://a/b/c/d;p?q#s

#s resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/plain;charset=iso-8859-7,%be%fg%be#s

rfc3986-12 <g#s>

(source)

g#s

g#s resolved against http://a/b/c/d;p?q yields: http://a/b/c/g#s

g#s resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g#s

rfc3986-13 <g?y#s>

(source)

g?y#s

g?y#s resolved against http://a/b/c/d;p?q yields: http://a/b/c/g?y#s

g?y#s resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g?y#s

rfc3986-14 <;x>

(source)

;x

;x resolved against http://a/b/c/d;p?q yields: http://a/b/c/;x

;x resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/;x

rfc3986-15 <g;x>

(source)

g;x

g;x resolved against http://a/b/c/d;p?q yields: http://a/b/c/g;x

g;x resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g;x

rfc3986-16 <g;x?y#s>

(source)

g;x?y#s

g;x?y#s resolved against http://a/b/c/d;p?q yields: http://a/b/c/g;x?y#s

g;x?y#s resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g;x?y#s

rfc3986-17 <>

(source)

resolved against http://a/b/c/d;p?q yields: http://a/b/c/d;p?q

resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/plain;charset=iso-8859-7,%be%fg%be

rfc3986-18 <.>

(source)

.

. resolved against http://a/b/c/d;p?q yields: http://a/b/c/

. resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/

rfc3986-19 <./>

(source)

./

./ resolved against http://a/b/c/d;p?q yields: http://a/b/c/

./ resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/

rfc3986-20 <..>

(source)

..

.. resolved against http://a/b/c/d;p?q yields: http://a/b/

.. resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/

rfc3986-21 <../>

(source)

../

../ resolved against http://a/b/c/d;p?q yields: http://a/b/

../ resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/

rfc3986-22 <../g>

(source)

../g

../g resolved against http://a/b/c/d;p?q yields: http://a/b/g

../g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-23 <../..>

(source)

../..

../.. resolved against http://a/b/c/d;p?q yields: http://a/

../.. resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/

rfc3986-24 <../../>

(source)

../../

../../ resolved against http://a/b/c/d;p?q yields: http://a/

../../ resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/

rfc3986-25 <../../g>

(source)

../../g

../../g resolved against http://a/b/c/d;p?q yields: http://a/g

../../g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-26 <../../../g>

(source)

../../../g

../../../g resolved against http://a/b/c/d;p?q yields: http://a/g

../../../g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-27 <../../../../g>

(source)

../../../../g

../../../../g resolved against http://a/b/c/d;p?q yields: http://a/g

../../../../g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-28 </./g>

(source)

/./g

/./g resolved against http://a/b/c/d;p?q yields: http://a/g

/./g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-29 </../g>

(source)

/../g

/../g resolved against http://a/b/c/d;p?q yields: http://a/g

/../g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:/g

rfc3986-30 <g.>

(source)

g.

g. resolved against http://a/b/c/d;p?q yields: http://a/b/c/g.

g. resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g.

rfc3986-31 <.g>

(source)

.g

.g resolved against http://a/b/c/d;p?q yields: http://a/b/c/.g

.g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/.g

rfc3986-32 <g..>

(source)

g..

g.. resolved against http://a/b/c/d;p?q yields: http://a/b/c/g..

g.. resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/g..

rfc3986-33 <..g>

(source)

..g

..g resolved against http://a/b/c/d;p?q yields: http://a/b/c/..g

..g resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/..g

RFC2397

Test cases from RFC 2397.

rfc2397-1 <data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7>

(source)

data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7

data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7 resolved against http://a/b/c/d;p?q yields: data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7

data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7 resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7

rfc2397-2 <data:text/plain;charset=iso-8859-7,%be%fg%be>

(source)

data:text/plain;charset=iso-8859-7,%be%fg%be

data:text/plain;charset=iso-8859-7,%be%fg%be resolved against http://a/b/c/d;p?q yields: data:text/plain;charset=iso-8859-7,%be%fg%be

data:text/plain;charset=iso-8859-7,%be%fg%be resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: data:text/plain;charset=iso-8859-7,%be%fg%be

RFC3987

Test cases from RFC 3987.

rfc3987-1 <http://www.example.org/Dürst>

(source)

http://www.example.org/Dürst

http://www.example.org/Dürst resolved against http://a/b/c/d;p?q yields: http://www.example.org/Dürst

http://www.example.org/Dürst resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: http://www.example.org/Dürst

LEIRIs

leiri-1 <http://www.example.org/foo bar/qux<>?\^`{|}>

http://www.example.org/foo bar/qux<>?\^`{|}

http://www.example.org/foo bar/qux<>?\^`{|} resolved against http://a/b/c/d;p?q yields: http://www.example.org/foo bar/qux<>?\^`{|}

http://www.example.org/foo bar/qux<>?\^`{|} resolved against data:text/plain;charset=iso-8859-7,%be%fg%be yields: http://www.example.org/foo bar/qux<>?\^`{|}

Some random tests

random-1 <;foo>

;foo

;foo resolved against http://example.com/b;bar yields: http://example.com/;foo

random-2 <http://2.example.org#frag2 >

http://2.example.org#frag2

http://2.example.org#frag2 resolved against http://1.example.org/path1/file1.ext yields: http://2.example.org#frag2

random-3 <?x>

?x

?x resolved against http://example.org/a/b yields: http://example.org/a/b?x

random-4 <http:test>

http:test

http:test resolved against http://example.org/foo/bar yields: http:test

random-5 <Bar.class>

Bar.class

Bar.class resolved against jar:http://example.com/jar?x=1!/com/example/Foo.class yields: jar:http://example.com/Bar.class

Test cases from Webkit's fast/url/anchor.js

cw-anchor-i1 <hello, world>

hello, world

hello, world resolved against http://www.example.com/# yields: http://www.example.com/hello, world

cw-anchor-i2 <%c2%a9>

%c2%a9

%c2%a9 resolved against http://www.example.com/# yields: http://www.example.com/%c2%a9

cw-anchor-i4 <%41%a>

%41%a

%41%a resolved against http://www.example.com/# yields: http://www.example.com/%41%a

cw-anchor-i7 <asdf#qwer>

asdf#qwer

asdf#qwer resolved against http://www.example.com/# yields: http://www.example.com/asdf#qwer

cw-anchor-i8 <#asdf>

#asdf

#asdf resolved against http://www.example.com/# yields: http://www.example.com/#asdf

Test cases from Webkit's fast/url/file-http-base.js

cw-file-http-base-i10 <file:c:\\foo\\bar.html>

file:c:\\foo\\bar.html

file:c:\\foo\\bar.html resolved against http://www.example.com/foo/bar yields: file:c:\\foo\\bar.html

cw-file-http-base-i11 < File:c|////foo\\bar.html>

File:c|////foo\\bar.html

File:c|////foo\\bar.html resolved against http://www.example.com/foo/bar yields: File:c|////foo\\bar.html

cw-file-http-base-i12 <file:>

file:

file: resolved against http://www.example.com/foo/bar yields: file:

cw-file-http-base-i13 <file:UNChost/path>

file:UNChost/path

file:UNChost/path resolved against http://www.example.com/foo/bar yields: file:UNChost/path

cw-file-http-base-i14 <c:\\foo\\bar>

c:\\foo\\bar

c:\\foo\\bar resolved against http://www.example.com/foo/bar yields: c:\\foo\\bar

cw-file-http-base-i15 <C|/foo/bar>

C|/foo/bar

C|/foo/bar resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/C|/foo/bar

cw-file-http-base-i16 </C|\\foo\\bar>

/C|\\foo\\bar

/C|\\foo\\bar resolved against http://www.example.com/foo/bar yields: http://www.example.com/C|\\foo\\bar

cw-file-http-base-i17 <//C|/foo/bar>

//C|/foo/bar

//C|/foo/bar resolved against http://www.example.com/foo/bar yields: http://C|/foo/bar

cw-file-http-base-i18 <//server/file>

//server/file

//server/file resolved against http://www.example.com/foo/bar yields: http://server/file

cw-file-http-base-i19 <\\\\server\\file>

\\\\server\\file

\\\\server\\file resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/\\\\server\\file

cw-file-http-base-i20 </\\server/file>

/\\server/file

/\\server/file resolved against http://www.example.com/foo/bar yields: http://www.example.com/\\server/file

cw-file-http-base-i21 <file:c:foo/bar.html>

file:c:foo/bar.html

file:c:foo/bar.html resolved against http://www.example.com/foo/bar yields: file:c:foo/bar.html

cw-file-http-base-i22 <file:/\\/\\C:\\\\//foo\\bar.html>

file:/\\/\\C:\\\\//foo\\bar.html

file:/\\/\\C:\\\\//foo\\bar.html resolved against http://www.example.com/foo/bar yields: file:/\\/\\C:\\\\//foo\\bar.html

cw-file-http-base-i23 <file:///foo/bar.txt>

file:///foo/bar.txt

file:///foo/bar.txt resolved against http://www.example.com/foo/bar yields: file:///foo/bar.txt

cw-file-http-base-i24 <FILE:/\\/\\7:\\\\//foo\\bar.html>

FILE:/\\/\\7:\\\\//foo\\bar.html

FILE:/\\/\\7:\\\\//foo\\bar.html resolved against http://www.example.com/foo/bar yields: FILE:/\\/\\7:\\\\//foo\\bar.html

cw-file-http-base-i25 <file:filer/home\\me>

file:filer/home\\me

file:filer/home\\me resolved against http://www.example.com/foo/bar yields: file:filer/home\\me

cw-file-http-base-i26 <file:///C:/foo/../../../bar.html>

file:///C:/foo/../../../bar.html

file:///C:/foo/../../../bar.html resolved against http://www.example.com/foo/bar yields: file:///bar.html

cw-file-http-base-i27 <file:///C:/asdf#\%c2>

file:///C:/asdf#\%c2

file:///C:/asdf#\%c2 resolved against http://www.example.com/foo/bar yields: file:///C:/asdf#\%c2

cw-file-http-base-i28 <file:///home/me>

file:///home/me

file:///home/me resolved against http://www.example.com/foo/bar yields: file:///home/me

cw-file-http-base-i29 <file:c:\\foo\\bar.html>

file:c:\\foo\\bar.html

file:c:\\foo\\bar.html resolved against http://www.example.com/foo/bar yields: file:c:\\foo\\bar.html

cw-file-http-base-i30 <file:c|//foo\\bar.html>

file:c|//foo\\bar.html

file:c|//foo\\bar.html resolved against http://www.example.com/foo/bar yields: file:c|//foo\\bar.html

cw-file-http-base-i31 <//>

//

// resolved against http://www.example.com/foo/bar yields: http://

cw-file-http-base-i32 <///>

///

/// resolved against http://www.example.com/foo/bar yields: http:///

cw-file-http-base-i33 <///test>

///test

///test resolved against http://www.example.com/foo/bar yields: http:///test

cw-file-http-base-i34 <file://test>

file://test

file://test resolved against http://www.example.com/foo/bar yields: file://test

cw-file-http-base-i35 <file://localhost/>

file://localhost/

file://localhost/ resolved against http://www.example.com/foo/bar yields: file://localhost/

cw-file-http-base-i36 <file://localhost/test>

file://localhost/test

file://localhost/test resolved against http://www.example.com/foo/bar yields: file://localhost/test

Test cases from Webkit's fast/url/file.js

cw-file-i37 <file:c:\\foo\\bar.html>

file:c:\\foo\\bar.html

file:c:\\foo\\bar.html resolved against file:///tmp/mock/path yields: file:c:\\foo\\bar.html

cw-file-i38 < File:c|////foo\\bar.html>

File:c|////foo\\bar.html

File:c|////foo\\bar.html resolved against file:///tmp/mock/path yields: File:c|////foo\\bar.html

cw-file-i39 <file:>

file:

file: resolved against file:///tmp/mock/path yields: file:

cw-file-i40 <file:UNChost/path>

file:UNChost/path

file:UNChost/path resolved against file:///tmp/mock/path yields: file:UNChost/path

cw-file-i41 <c:\\foo\\bar>

c:\\foo\\bar

c:\\foo\\bar resolved against file:///tmp/mock/path yields: c:\\foo\\bar

cw-file-i42 <C|/foo/bar>

C|/foo/bar

C|/foo/bar resolved against file:///tmp/mock/path yields: file:///tmp/mock/C|/foo/bar

cw-file-i43 </C|\\foo\\bar>

/C|\\foo\\bar

/C|\\foo\\bar resolved against file:///tmp/mock/path yields: file:///C|\\foo\\bar

cw-file-i44 <//C|/foo/bar>

//C|/foo/bar

//C|/foo/bar resolved against file:///tmp/mock/path yields: file://C|/foo/bar

cw-file-i45 <//server/file>

//server/file

//server/file resolved against file:///tmp/mock/path yields: file://server/file

cw-file-i46 <\\\\server\\file>

\\\\server\\file

\\\\server\\file resolved against file:///tmp/mock/path yields: file:///tmp/mock/\\\\server\\file

cw-file-i47 </\\server/file>

/\\server/file

/\\server/file resolved against file:///tmp/mock/path yields: file:///\\server/file

cw-file-i48 <file:c:foo/bar.html>

file:c:foo/bar.html

file:c:foo/bar.html resolved against file:///tmp/mock/path yields: file:c:foo/bar.html

cw-file-i49 <file:/\\/\\C:\\\\//foo\\bar.html>

file:/\\/\\C:\\\\//foo\\bar.html

file:/\\/\\C:\\\\//foo\\bar.html resolved against file:///tmp/mock/path yields: file:/\\/\\C:\\\\//foo\\bar.html

cw-file-i50 <file:///foo/bar.txt>

file:///foo/bar.txt

file:///foo/bar.txt resolved against file:///tmp/mock/path yields: file:///foo/bar.txt

cw-file-i51 <FILE:/\\/\\7:\\\\//foo\\bar.html>

FILE:/\\/\\7:\\\\//foo\\bar.html

FILE:/\\/\\7:\\\\//foo\\bar.html resolved against file:///tmp/mock/path yields: FILE:/\\/\\7:\\\\//foo\\bar.html

cw-file-i52 <file:filer/home\\me>

file:filer/home\\me

file:filer/home\\me resolved against file:///tmp/mock/path yields: file:filer/home\\me

cw-file-i53 <file:///C:/foo/../../../bar.html>

file:///C:/foo/../../../bar.html

file:///C:/foo/../../../bar.html resolved against file:///tmp/mock/path yields: file:///bar.html

cw-file-i54 <file:///C:/asdf#\%c2>

file:///C:/asdf#\%c2

file:///C:/asdf#\%c2 resolved against file:///tmp/mock/path yields: file:///C:/asdf#\%c2

cw-file-i55 <file:///home/me>

file:///home/me

file:///home/me resolved against file:///tmp/mock/path yields: file:///home/me

cw-file-i56 <file:c:\\foo\\bar.html>

file:c:\\foo\\bar.html

file:c:\\foo\\bar.html resolved against file:///tmp/mock/path yields: file:c:\\foo\\bar.html

cw-file-i57 <file:c|//foo\\bar.html>

file:c|//foo\\bar.html

file:c|//foo\\bar.html resolved against file:///tmp/mock/path yields: file:c|//foo\\bar.html

cw-file-i58 <//>

//

// resolved against file:///tmp/mock/path yields: file://

cw-file-i59 <///>

///

/// resolved against file:///tmp/mock/path yields: file:///

cw-file-i60 <///test>

///test

///test resolved against file:///tmp/mock/path yields: file:///test

cw-file-i61 <file://test>

file://test

file://test resolved against file:///tmp/mock/path yields: file://test

cw-file-i62 <file://localhost/>

file://localhost/

file://localhost/ resolved against file:///tmp/mock/path yields: file://localhost/

cw-file-i63 <file://localhost/test>

file://localhost/test

file://localhost/test resolved against file:///tmp/mock/path yields: file://localhost/test

Test cases from Webkit's fast/url/host.js

cw-host-i64 <GoOgLe.CoM>

GoOgLe.CoM

GoOgLe.CoM resolved against http:// yields: http:///GoOgLe.CoM

cw-host-i65 <Goo%20 goo%7C|.com>

Goo%20 goo%7C|.com

Goo%20 goo%7C|.com resolved against http:// yields: http:///Goo%20 goo%7C|.com

cw-host-i70 <%ef%b7%90zyx.com>

%ef%b7%90zyx.com

%ef%b7%90zyx.com resolved against http:// yields: http:///%ef%b7%90zyx.com

cw-host-i73 <%ef%bc%85%ef%bc%94%ef%bc%91.com>

%ef%bc%85%ef%bc%94%ef%bc%91.com

%ef%bc%85%ef%bc%94%ef%bc%91.com resolved against http:// yields: http:///%ef%bc%85%ef%bc%94%ef%bc%91.com

cw-host-i75 <%ef%bc%85%ef%bc%90%ef%bc%90.com>

%ef%bc%85%ef%bc%90%ef%bc%90.com

%ef%bc%85%ef%bc%90%ef%bc%90.com resolved against http:// yields: http:///%ef%bc%85%ef%bc%90%ef%bc%90.com

cw-host-i78 <%zz%66%a>

%zz%66%a

%zz%66%a resolved against http:// yields: http:///%zz%66%a

cw-host-i79 <%25>

%25

%25 resolved against http:// yields: http:///%25

cw-host-i80 <hello%00>

hello%00

hello%00 resolved against http:// yields: http:///hello%00

cw-host-i81 <%30%78%63%30%2e%30%32%35%30.01>

%30%78%63%30%2e%30%32%35%30.01

%30%78%63%30%2e%30%32%35%30.01 resolved against http:// yields: http:///%30%78%63%30%2e%30%32%35%30.01

cw-host-i82 <%30%78%63%30%2e%30%32%35%30.01%2e>

%30%78%63%30%2e%30%32%35%30.01%2e

%30%78%63%30%2e%30%32%35%30.01%2e resolved against http:// yields: http:///%30%78%63%30%2e%30%32%35%30.01%2e

cw-host-i83 <%3g%78%63%30%2e%30%32%35%30%2E.01>

%3g%78%63%30%2e%30%32%35%30%2E.01

%3g%78%63%30%2e%30%32%35%30%2E.01 resolved against http:// yields: http:///%3g%78%63%30%2e%30%32%35%30%2E.01

cw-host-i84 <192.168.0.1 hello>

192.168.0.1 hello

192.168.0.1 hello resolved against http:// yields: http:///192.168.0.1 hello

cw-host-i86 <192.168.0.257>

192.168.0.257

192.168.0.257 resolved against http:// yields: http:///192.168.0.257

cw-host-i87 <[google.com]>

[google.com]

[google.com] resolved against http:// yields: http:///[google.com]

cw-host-i89 <go\@ogle.com>

go\@ogle.com

go\@ogle.com resolved against http:// yields: http:///go\@ogle.com

cw-host-i90 <go/@ogle.com>

go/@ogle.com

go/@ogle.com resolved against http:// yields: http:///go/@ogle.com

cw-host-i91 <www.lookout.net::==80::==443::>

www.lookout.net::==80::==443::

www.lookout.net::==80::==443:: resolved against http:// yields: www.lookout.net::==80::==443::

cw-host-i92 <www.lookout.net::80::443>

www.lookout.net::80::443

www.lookout.net::80::443 resolved against http:// yields: www.lookout.net::80::443

cw-host-i93 <\>

\

\ resolved against http:// yields: http:///\

cw-host-i94 <\\/>

\\/

\\/ resolved against http:// yields: http:///\\/

cw-host-i95 <\./>

\./

\./ resolved against http:// yields: http:///\./

cw-host-i96 <//:@/>

//:@/

//:@/ resolved against http:// yields: http://:@/

cw-host-i97 <\google.com/foo>

\google.com/foo

\google.com/foo resolved against http:// yields: http:///\google.com/foo

cw-host-i98 <\\google.com/foo>

\\google.com/foo

\\google.com/foo resolved against http:// yields: http:///\\google.com/foo

cw-host-i99 <//asdf@/>

//asdf@/

//asdf@/ resolved against http:// yields: http://asdf@/

cw-host-i100 <//:81>

//:81

//:81 resolved against http:// yields: http://:81

cw-host-i101 <://>

://

:// resolved against http:// yields: http:///://

cw-host-i102 <c:>

c:

c: resolved against http:// yields: c:

cw-host-i103 <xxxx:>

xxxx:

xxxx: resolved against http:// yields: xxxx:

cw-host-i104 <.:.>

.:.

.:. resolved against http:// yields: .:

cw-host-i105 <////@google.com/>

////@google.com/

////@google.com/ resolved against http:// yields: http:////@google.com/

cw-host-i106 <@google.com>

@google.com

@google.com resolved against http:// yields: http:///@google.com

Test cases from Webkit's fast/url/idna2003.js

Test cases from Webkit's fast/url/idna2008.js

cw-idna2008-i147 <gOoGle.com>

gOoGle.com

gOoGle.com resolved against http:// yields: http:///gOoGle.com

cw-idna2008-i151 <-foo.bar.com>

-foo.bar.com

-foo.bar.com resolved against http:// yields: http:///-foo.bar.com

cw-idna2008-i152 <foo-.bar.com>

foo-.bar.com

foo-.bar.com resolved against http:// yields: http:///foo-.bar.com

cw-idna2008-i153 <ab--cd.com>

ab--cd.com

ab--cd.com resolved against http:// yields: http:///ab--cd.com

cw-idna2008-i154 <xn--0.com>

xn--0.com

xn--0.com resolved against http:// yields: http:///xn--0.com

Test cases from Webkit's fast/url/ipv4.js

cw-ipv4-i156 <.>

.

. resolved against http:// yields: http:///

cw-ipv4-i157 <192.168.0.1>

192.168.0.1

192.168.0.1 resolved against http:// yields: http:///192.168.0.1

cw-ipv4-i158 <0300.0250.00.01>

0300.0250.00.01

0300.0250.00.01 resolved against http:// yields: http:///0300.0250.00.01

cw-ipv4-i159 <0xC0.0Xa8.0x0.0x1>

0xC0.0Xa8.0x0.0x1

0xC0.0Xa8.0x0.0x1 resolved against http:// yields: http:///0xC0.0Xa8.0x0.0x1

cw-ipv4-i160 <192.168.9.com>

192.168.9.com

192.168.9.com resolved against http:// yields: http:///192.168.9.com

cw-ipv4-i161 <19a.168.0.1>

19a.168.0.1

19a.168.0.1 resolved against http:// yields: http:///19a.168.0.1

cw-ipv4-i162 <0308.0250.00.01>

0308.0250.00.01

0308.0250.00.01 resolved against http:// yields: http:///0308.0250.00.01

cw-ipv4-i163 <0xCG.0xA8.0x0.0x1>

0xCG.0xA8.0x0.0x1

0xCG.0xA8.0x0.0x1 resolved against http:// yields: http:///0xCG.0xA8.0x0.0x1

cw-ipv4-i164 <192>

192

192 resolved against http:// yields: http:///192

cw-ipv4-i165 <0xC0a80001>

0xC0a80001

0xC0a80001 resolved against http:// yields: http:///0xC0a80001

cw-ipv4-i166 <030052000001>

030052000001

030052000001 resolved against http:// yields: http:///030052000001

cw-ipv4-i167 <000030052000001>

000030052000001

000030052000001 resolved against http:// yields: http:///000030052000001

cw-ipv4-i168 <192.168>

192.168

192.168 resolved against http:// yields: http:///192.168

cw-ipv4-i169 <192.0x00A80001>

192.0x00A80001

192.0x00A80001 resolved against http:// yields: http:///192.0x00A80001

cw-ipv4-i170 <0xc0.052000001>

0xc0.052000001

0xc0.052000001 resolved against http:// yields: http:///0xc0.052000001

cw-ipv4-i171 <192.168.1>

192.168.1

192.168.1 resolved against http:// yields: http:///192.168.1

cw-ipv4-i172 <192.168.0.0.1>

192.168.0.0.1

192.168.0.0.1 resolved against http:// yields: http:///192.168.0.0.1

cw-ipv4-i173 <192.168.0.1.>

192.168.0.1.

192.168.0.1. resolved against http:// yields: http:///192.168.0.1.

cw-ipv4-i174 <192.168.0.1. hello>

192.168.0.1. hello

192.168.0.1. hello resolved against http:// yields: http:///192.168.0.1. hello

cw-ipv4-i175 <192.168.0.1..>

192.168.0.1..

192.168.0.1.. resolved against http:// yields: http:///192.168.0.1..

cw-ipv4-i176 <192.168..1>

192.168..1

192.168..1 resolved against http:// yields: http:///192.168..1

cw-ipv4-i177 <0x100.0>

0x100.0

0x100.0 resolved against http:// yields: http:///0x100.0

cw-ipv4-i178 <0x100.0.0>

0x100.0.0

0x100.0.0 resolved against http:// yields: http:///0x100.0.0

cw-ipv4-i179 <0x100.0.0.0>

0x100.0.0.0

0x100.0.0.0 resolved against http:// yields: http:///0x100.0.0.0

cw-ipv4-i180 <0.0x100.0.0>

0.0x100.0.0

0.0x100.0.0 resolved against http:// yields: http:///0.0x100.0.0

cw-ipv4-i181 <0.0.0x100.0>

0.0.0x100.0

0.0.0x100.0 resolved against http:// yields: http:///0.0.0x100.0

cw-ipv4-i182 <0.0.0.0x100>

0.0.0.0x100

0.0.0.0x100 resolved against http:// yields: http:///0.0.0.0x100

cw-ipv4-i183 <0.0.0x10000>

0.0.0x10000

0.0.0x10000 resolved against http:// yields: http:///0.0.0x10000

cw-ipv4-i184 <0.0x1000000>

0.0x1000000

0.0x1000000 resolved against http:// yields: http:///0.0x1000000

cw-ipv4-i185 <0x100000000>

0x100000000

0x100000000 resolved against http:// yields: http:///0x100000000

cw-ipv4-i186 <0xFF.0>

0xFF.0

0xFF.0 resolved against http:// yields: http:///0xFF.0

cw-ipv4-i187 <0xFF.0.0>

0xFF.0.0

0xFF.0.0 resolved against http:// yields: http:///0xFF.0.0

cw-ipv4-i188 <0xFF.0.0.0>

0xFF.0.0.0

0xFF.0.0.0 resolved against http:// yields: http:///0xFF.0.0.0

cw-ipv4-i189 <0.0xFF.0.0>

0.0xFF.0.0

0.0xFF.0.0 resolved against http:// yields: http:///0.0xFF.0.0

cw-ipv4-i190 <0.0.0xFF.0>

0.0.0xFF.0

0.0.0xFF.0 resolved against http:// yields: http:///0.0.0xFF.0

cw-ipv4-i191 <0.0.0.0xFF>

0.0.0.0xFF

0.0.0.0xFF resolved against http:// yields: http:///0.0.0.0xFF

cw-ipv4-i192 <0.0.0xFFFF>

0.0.0xFFFF

0.0.0xFFFF resolved against http:// yields: http:///0.0.0xFFFF

cw-ipv4-i193 <0.0xFFFFFF>

0.0xFFFFFF

0.0xFFFFFF resolved against http:// yields: http:///0.0xFFFFFF

cw-ipv4-i194 <0xFFFFFFFF>

0xFFFFFFFF

0xFFFFFFFF resolved against http:// yields: http:///0xFFFFFFFF

cw-ipv4-i195 <276.256.0xf1a2.077777>

276.256.0xf1a2.077777

276.256.0xf1a2.077777 resolved against http:// yields: http:///276.256.0xf1a2.077777

cw-ipv4-i196 <192.168.0.257>

192.168.0.257

192.168.0.257 resolved against http:// yields: http:///192.168.0.257

cw-ipv4-i197 <192.168.0xa20001>

192.168.0xa20001

192.168.0xa20001 resolved against http:// yields: http:///192.168.0xa20001

cw-ipv4-i198 <192.015052000001>

192.015052000001

192.015052000001 resolved against http:// yields: http:///192.015052000001

cw-ipv4-i199 <0X12C0a80001>

0X12C0a80001

0X12C0a80001 resolved against http:// yields: http:///0X12C0a80001

cw-ipv4-i200 <276.1.2>

276.1.2

276.1.2 resolved against http:// yields: http:///276.1.2

cw-ipv4-i201 <192.168.0.1 hello>

192.168.0.1 hello

192.168.0.1 hello resolved against http:// yields: http:///192.168.0.1 hello

cw-ipv4-i202 <0000000000000300.0x00000000000000fF.00000000000000001>

0000000000000300.0x00000000000000fF.00000000000000001

0000000000000300.0x00000000000000fF.00000000000000001 resolved against http:// yields: http:///0000000000000300.0x00000000000000fF.00000000000000001

cw-ipv4-i203 <0000000000000300.0xffffffffFFFFFFFF.3022415481470977>

0000000000000300.0xffffffffFFFFFFFF.3022415481470977

0000000000000300.0xffffffffFFFFFFFF.3022415481470977 resolved against http:// yields: http:///0000000000000300.0xffffffffFFFFFFFF.3022415481470977

cw-ipv4-i204 <00000000000000000001>

00000000000000000001

00000000000000000001 resolved against http:// yields: http:///00000000000000000001

cw-ipv4-i205 <0000000000000000100000000000000001>

0000000000000000100000000000000001

0000000000000000100000000000000001 resolved against http:// yields: http:///0000000000000000100000000000000001

cw-ipv4-i206 <0.0.0.000000000000000000z>

0.0.0.000000000000000000z

0.0.0.000000000000000000z resolved against http:// yields: http:///0.0.0.000000000000000000z

cw-ipv4-i207 <0.0.0.100000000000000000z>

0.0.0.100000000000000000z

0.0.0.100000000000000000z resolved against http:// yields: http:///0.0.0.100000000000000000z

cw-ipv4-i208 <0.00.0x.0x0>

0.00.0x.0x0

0.00.0x.0x0 resolved against http:// yields: http:///0.00.0x.0x0

Test cases from Webkit's fast/url/ipv6.js

cw-ipv6-i209 <[>

[

[ resolved against http:// yields: http:///[

cw-ipv6-i210 <[:>

[:

[: resolved against http:// yields: [:

cw-ipv6-i211 <]>

]

] resolved against http:// yields: http:///]

cw-ipv6-i212 <:]>

:]

:] resolved against http:// yields: http:///:]

cw-ipv6-i213 <[]>

[]

[] resolved against http:// yields: http:///[]

cw-ipv6-i214 <[:]>

[:]

[:] resolved against http:// yields: [:]

cw-ipv6-i215 <2001:db8::1>

2001:db8::1

2001:db8::1 resolved against http:// yields: 2001:db8::1

cw-ipv6-i216 <[2001:db8::1>

[2001:db8::1

[2001:db8::1 resolved against http:// yields: [2001:db8::1

cw-ipv6-i217 <2001:db8::1]>

2001:db8::1]

2001:db8::1] resolved against http:// yields: 2001:db8::1]

cw-ipv6-i218 <[::]>

[::]

[::] resolved against http:// yields: [::]

cw-ipv6-i219 <[::1]>

[::1]

[::1] resolved against http:// yields: [::1]

cw-ipv6-i220 <[1::]>

[1::]

[1::] resolved against http:// yields: [1::]

cw-ipv6-i221 <[::192.168.0.1]>

[::192.168.0.1]

[::192.168.0.1] resolved against http:// yields: [::192.168.0.1]

cw-ipv6-i222 <[::ffff:192.168.0.1]>

[::ffff:192.168.0.1]

[::ffff:192.168.0.1] resolved against http:// yields: [::ffff:192.168.0.1]

cw-ipv6-i223 <[000:01:02:003:004:5:6:007]>

[000:01:02:003:004:5:6:007]

[000:01:02:003:004:5:6:007] resolved against http:// yields: [000:01:02:003:004:5:6:007]

cw-ipv6-i224 <[A:b:c:DE:fF:0:1:aC]>

[A:b:c:DE:fF:0:1:aC]

[A:b:c:DE:fF:0:1:aC] resolved against http:// yields: [A:b:c:DE:fF:0:1:aC]

cw-ipv6-i225 <[1:0:0:2::3:0]>

[1:0:0:2::3:0]

[1:0:0:2::3:0] resolved against http:// yields: [1:0:0:2::3:0]

cw-ipv6-i226 <[1::2:0:0:3:0]>

[1::2:0:0:3:0]

[1::2:0:0:3:0] resolved against http:// yields: [1::2:0:0:3:0]

cw-ipv6-i227 <[::eeee:192.168.0.1]>

[::eeee:192.168.0.1]

[::eeee:192.168.0.1] resolved against http:// yields: [::eeee:192.168.0.1]

cw-ipv6-i228 <[2001::192.168.0.1]>

[2001::192.168.0.1]

[2001::192.168.0.1] resolved against http:// yields: [2001::192.168.0.1]

cw-ipv6-i229 <[1:2:192.168.0.1:5:6]>

[1:2:192.168.0.1:5:6]

[1:2:192.168.0.1:5:6] resolved against http:// yields: [1:2:192.168.0.1:5:6]

cw-ipv6-i230 <[::ffff:192.1.2]>

[::ffff:192.1.2]

[::ffff:192.1.2] resolved against http:// yields: [::ffff:192.1.2]

cw-ipv6-i231 <[::ffff:0xC0.0Xa8.0x0.0x1]>

[::ffff:0xC0.0Xa8.0x0.0x1]

[::ffff:0xC0.0Xa8.0x0.0x1] resolved against http:// yields: [::ffff:0xC0.0Xa8.0x0.0x1]

cw-ipv6-i232 <[0:0::0:0:8]>

[0:0::0:0:8]

[0:0::0:0:8] resolved against http:// yields: [0:0::0:0:8]

cw-ipv6-i233 <[2001:db8::1]>

[2001:db8::1]

[2001:db8::1] resolved against http:// yields: [2001:db8::1]

cw-ipv6-i234 <[2001::db8::1]>

[2001::db8::1]

[2001::db8::1] resolved against http:// yields: [2001::db8::1]

cw-ipv6-i235 <[2001:db8:::1]>

[2001:db8:::1]

[2001:db8:::1] resolved against http:// yields: [2001:db8:::1]

cw-ipv6-i236 <[:::]>

[:::]

[:::] resolved against http:// yields: [:::]

cw-ipv6-i237 <[2001::.com]>

[2001::.com]

[2001::.com] resolved against http:// yields: [2001::.com]

cw-ipv6-i238 <[::192.168.0.0.1]>

[::192.168.0.0.1]

[::192.168.0.0.1] resolved against http:// yields: [::192.168.0.0.1]

cw-ipv6-i239 <[::ffff:192.168.0.0.1]>

[::ffff:192.168.0.0.1]

[::ffff:192.168.0.0.1] resolved against http:// yields: [::ffff:192.168.0.0.1]

cw-ipv6-i240 <[1:2:3:4:5:6:7:8:9]>

[1:2:3:4:5:6:7:8:9]

[1:2:3:4:5:6:7:8:9] resolved against http:// yields: [1:2:3:4:5:6:7:8:9]

cw-ipv6-i241 <[0:0:0:0:0:0:0:192.168.0.1]>

[0:0:0:0:0:0:0:192.168.0.1]

[0:0:0:0:0:0:0:192.168.0.1] resolved against http:// yields: [0:0:0:0:0:0:0:192.168.0.1]

cw-ipv6-i242 <[1:2:3:4:5:6::192.168.0.1]>

[1:2:3:4:5:6::192.168.0.1]

[1:2:3:4:5:6::192.168.0.1] resolved against http:// yields: [1:2:3:4:5:6::192.168.0.1]

cw-ipv6-i243 <[1:2:3:4:5:6::8]>

[1:2:3:4:5:6::8]

[1:2:3:4:5:6::8] resolved against http:// yields: [1:2:3:4:5:6::8]

cw-ipv6-i244 <[1:2:3:4:5:6:7:8:]>

[1:2:3:4:5:6:7:8:]

[1:2:3:4:5:6:7:8:] resolved against http:// yields: [1:2:3:4:5:6:7:8:]

cw-ipv6-i245 <[1:2:3:4:5:6:192.168.0.1:]>

[1:2:3:4:5:6:192.168.0.1:]

[1:2:3:4:5:6:192.168.0.1:] resolved against http:// yields: [1:2:3:4:5:6:192.168.0.1:]

cw-ipv6-i246 <[-1:2:3:4:5:6:7:8]>

[-1:2:3:4:5:6:7:8]

[-1:2:3:4:5:6:7:8] resolved against http:// yields: [-1:2:3:4:5:6:7:8]

cw-ipv6-i247 <[1::%1]>

[1::%1]

[1::%1] resolved against http:// yields: [1::%1]

cw-ipv6-i248 <[1::%eth0]>

[1::%eth0]

[1::%eth0] resolved against http:// yields: [1::%eth0]

cw-ipv6-i249 <[1::%]>

[1::%]

[1::%] resolved against http:// yields: [1::%]

cw-ipv6-i250 <[%]>

[%]

[%] resolved against http:// yields: http:///[%]

cw-ipv6-i251 <[::%:]>

[::%:]

[::%:] resolved against http:// yields: [::%:]

cw-ipv6-i252 <[:0:0::0:0:8]>

[:0:0::0:0:8]

[:0:0::0:0:8] resolved against http:// yields: [:0:0::0:0:8]

cw-ipv6-i253 <[0:0::0:0:8:]>

[0:0::0:0:8:]

[0:0::0:0:8:] resolved against http:// yields: [0:0::0:0:8:]

cw-ipv6-i254 <[:0:0::0:0:8:]>

[:0:0::0:0:8:]

[:0:0::0:0:8:] resolved against http:// yields: [:0:0::0:0:8:]

cw-ipv6-i255 <[::192.168..1]>

[::192.168..1]

[::192.168..1] resolved against http:// yields: [::192.168..1]

cw-ipv6-i256 <[::1 hello]>

[::1 hello]

[::1 hello] resolved against http:// yields: [::1 hello]

Test cases from Webkit's fast/url/mailto.js

cw-mailto-i257 <addr1>

addr1

addr1 resolved against mailto: yields: mailto:addr1

cw-mailto-i258 <addr1@foo.com>

addr1@foo.com

addr1@foo.com resolved against mailto: yields: mailto:addr1@foo.com

cw-mailto-i259 <addr1 \t >

addr1 \t

addr1 \t resolved against mailto: yields: mailto:addr1 \t

cw-mailto-i260 <addr1?to=jon>

addr1?to=jon

addr1?to=jon resolved against mailto: yields: mailto:addr1?to=jon

cw-mailto-i261 <addr1,addr2>

addr1,addr2

addr1,addr2 resolved against mailto: yields: mailto:addr1,addr2

cw-mailto-i262 <addr1, addr2>

addr1, addr2

addr1, addr2 resolved against mailto: yields: mailto:addr1, addr2

cw-mailto-i263 <addr1%2caddr2>

addr1%2caddr2

addr1%2caddr2 resolved against mailto: yields: mailto:addr1%2caddr2

cw-mailto-i265 <addr1?>

addr1?

addr1? resolved against mailto: yields: mailto:addr1?

Test cases from Webkit's fast/url/path-url.js

Test cases from Webkit's fast/url/path.js

cw-path-i268 </././foo>

/././foo

/././foo resolved against http://www.example.com yields: http://www.example.com/foo

cw-path-i269 </./.foo>

/./.foo

/./.foo resolved against http://www.example.com yields: http://www.example.com/.foo

cw-path-i270 </foo/.>

/foo/.

/foo/. resolved against http://www.example.com yields: http://www.example.com/foo/

cw-path-i271 </foo/./>

/foo/./

/foo/./ resolved against http://www.example.com yields: http://www.example.com/foo/

cw-path-i272 </foo/bar/..>

/foo/bar/..

/foo/bar/.. resolved against http://www.example.com yields: http://www.example.com/foo/

cw-path-i273 </foo/bar/../>

/foo/bar/../

/foo/bar/../ resolved against http://www.example.com yields: http://www.example.com/foo/

cw-path-i274 </foo/..bar>

/foo/..bar

/foo/..bar resolved against http://www.example.com yields: http://www.example.com/foo/..bar

cw-path-i275 </foo/bar/../ton>

/foo/bar/../ton

/foo/bar/../ton resolved against http://www.example.com yields: http://www.example.com/foo/ton

cw-path-i276 </foo/bar/../ton/../../a>

/foo/bar/../ton/../../a

/foo/bar/../ton/../../a resolved against http://www.example.com yields: http://www.example.com/a

cw-path-i277 </foo/../../..>

/foo/../../..

/foo/../../.. resolved against http://www.example.com yields: http://www.example.com/

cw-path-i278 </foo/../../../ton>

/foo/../../../ton

/foo/../../../ton resolved against http://www.example.com yields: http://www.example.com/ton

cw-path-i279 </foo/%2e>

/foo/%2e

/foo/%2e resolved against http://www.example.com yields: http://www.example.com/foo/%2e

cw-path-i280 </foo/%2e%2>

/foo/%2e%2

/foo/%2e%2 resolved against http://www.example.com yields: http://www.example.com/foo/%2e%2

cw-path-i281 </foo/%2e./%2e%2e/.%2e/%2e.bar>

/foo/%2e./%2e%2e/.%2e/%2e.bar

/foo/%2e./%2e%2e/.%2e/%2e.bar resolved against http://www.example.com yields: http://www.example.com/foo/%2e./%2e%2e/.%2e/%2e.bar

cw-path-i282 <////../..>

////../..

////../.. resolved against http://www.example.com yields: http:///

cw-path-i283 </foo/bar//../..>

/foo/bar//../..

/foo/bar//../.. resolved against http://www.example.com yields: http://www.example.com/foo/

cw-path-i284 </foo/bar//..>

/foo/bar//..

/foo/bar//.. resolved against http://www.example.com yields: http://www.example.com/foo/bar/

cw-path-i285 </foo/bar/..>

/foo/bar/..

/foo/bar/.. resolved against http://www.example.com yields: http://www.example.com/foo/

cw-path-i286 </foo>

/foo

/foo resolved against http://www.example.com yields: http://www.example.com/foo

cw-path-i287 </%20foo>

/%20foo

/%20foo resolved against http://www.example.com yields: http://www.example.com/%20foo

cw-path-i288 </foo%>

/foo%

/foo% resolved against http://www.example.com yields: http://www.example.com/foo%

cw-path-i289 </foo%2>

/foo%2

/foo%2 resolved against http://www.example.com yields: http://www.example.com/foo%2

cw-path-i290 </foo%2zbar>

/foo%2zbar

/foo%2zbar resolved against http://www.example.com yields: http://www.example.com/foo%2zbar

cw-path-i292 </foo%41%7a>

/foo%41%7a

/foo%41%7a resolved against http://www.example.com yields: http://www.example.com/foo%41%7a

cw-path-i294 </foo%00%51>

/foo%00%51

/foo%00%51 resolved against http://www.example.com yields: http://www.example.com/foo%00%51

cw-path-i295 </(%28:%3A%29)>

/(%28:%3A%29)

/(%28:%3A%29) resolved against http://www.example.com yields: http://www.example.com/(%28:%3A%29)

cw-path-i296 </%3A%3a%3C%3c>

/%3A%3a%3C%3c

/%3A%3a%3C%3c resolved against http://www.example.com yields: http://www.example.com/%3A%3a%3C%3c

cw-path-i297 </foo\tbar>

/foo\tbar

/foo\tbar resolved against http://www.example.com yields: http://www.example.com/foo\tbar

cw-path-i298 <\\foo\\bar>

\\foo\\bar

\\foo\\bar resolved against http://www.example.com yields: http://www.example.com/\\foo\\bar

cw-path-i299 </%7Ffp3%3Eju%3Dduvgw%3Dd>

/%7Ffp3%3Eju%3Dduvgw%3Dd

/%7Ffp3%3Eju%3Dduvgw%3Dd resolved against http://www.example.com yields: http://www.example.com/%7Ffp3%3Eju%3Dduvgw%3Dd

cw-path-i300 </@asdf%40>

/@asdf%40

/@asdf%40 resolved against http://www.example.com yields: http://www.example.com/@asdf%40

Test cases from Webkit's fast/url/port.js

cw-port-i308 <as df>

as df

as df resolved against http://www.example.com: yields: http://www.example.com:/as df

cw-port-i309 <-2>

-2

-2 resolved against http://www.example.com: yields: http://www.example.com:/-2

cw-port-i310 <80>

80

80 resolved against http://www.example.com: yields: http://www.example.com:/80

cw-port-i311 <8080>

8080

8080 resolved against http://www.example.com: yields: http://www.example.com:/8080

cw-port-i312 <>

resolved against http://www.example.com: yields: http://www.example.com:

Test cases from Webkit's fast/url/query.js

cw-query-i315 <foo=bar>

foo=bar

foo=bar resolved against http://www.example.com/? yields: http://www.example.com/foo=bar

cw-query-i316 <as?df>

as?df

as?df resolved against http://www.example.com/? yields: http://www.example.com/as?df

cw-query-i317 <\%02hello%7f bye>

\%02hello%7f bye

\%02hello%7f bye resolved against http://www.example.com/? yields: http://www.example.com/\%02hello%7f bye

cw-query-i318 <%40%41123>

%40%41123

%40%41123 resolved against http://www.example.com/? yields: http://www.example.com/%40%41123

cw-query-i321 <q=&lt;asdf&gt;>

q=&lt;asdf&gt;

q=&lt;asdf&gt; resolved against http://www.example.com/? yields: http://www.example.com/q=&lt;asdf&gt;

cw-query-i322 <q=\"asdf\">

q=\"asdf\"

q=\"asdf\" resolved against http://www.example.com/? yields: http://www.example.com/q=\"asdf\"

Test cases from Webkit's fast/url/relative-unix.js

cw-relative-unix-i323 <\\\\Another\\path>

\\\\Another\\path

\\\\Another\\path resolved against http://host/a yields: http://host/\\\\Another\\path

cw-relative-unix-i324 </c:\\foo>

/c:\\foo

/c:\\foo resolved against http://host/a yields: http://host/c:\\foo

cw-relative-unix-i325 <//c:\\foo>

//c:\\foo

//c:\\foo resolved against http://host/a yields: http://c:\\foo

Test cases from Webkit's fast/url/relative-win.js

cw-relative-win-i326 <http://host/>

http://host/

http://host/ resolved against file:///C:/foo yields: http://host/

cw-relative-win-i327 <bar>

bar

bar resolved against file:///C:/foo yields: file:///C:/bar

cw-relative-win-i328 <../../../bar.html>

../../../bar.html

../../../bar.html resolved against file:///C:/foo yields: file:///bar.html

cw-relative-win-i329 </../bar.html>

/../bar.html

/../bar.html resolved against file:///C:/foo yields: file:///bar.html

cw-relative-win-i330 <\\\\another\\path>

\\\\another\\path

\\\\another\\path resolved against http://host/a yields: http://host/\\\\another\\path

cw-relative-win-i331 <//c:/foo>

//c:/foo

//c:/foo resolved against file:///C:/something yields: file://c:/foo

cw-relative-win-i332 <//localhost/c:/foo>

//localhost/c:/foo

//localhost/c:/foo resolved against file:///C:/something yields: file://localhost/c:/foo

cw-relative-win-i333 <c:>

c:

c: resolved against file:///C:/foo yields: c:

cw-relative-win-i334 <c:/foo>

c:/foo

c:/foo resolved against file:///C:/foo yields: c:/foo

cw-relative-win-i335 <c:\\foo>

c:\\foo

c:\\foo resolved against http://host/a yields: c:\\foo

cw-relative-win-i336 </z:/bar>

/z:/bar

/z:/bar resolved against file:///C:/foo yields: file:///z:/bar

cw-relative-win-i337 </bar>

/bar

/bar resolved against file:///C:/foo yields: file:///bar

cw-relative-win-i338 </bar>

/bar

/bar resolved against file://localhost/C:/foo yields: file://localhost/bar

cw-relative-win-i339 </bar>

/bar

/bar resolved against file:///C:/foo/com/ yields: file:///bar

cw-relative-win-i340 <//somehost/path>

//somehost/path

//somehost/path resolved against file:///C:/something yields: file://somehost/path

cw-relative-win-i341 </\\//somehost/path>

/\\//somehost/path

/\\//somehost/path resolved against file:///C:/something yields: file:///\\//somehost/path

Test cases from Webkit's fast/url/relative.js

cw-relative-i342 <http://another/>

http://another/

http://another/ resolved against http://host/a yields: http://another/

cw-relative-i343 <http:////another/>

http:////another/

http:////another/ resolved against http://host/a yields: http:////another/

cw-relative-i344 <>

resolved against http://foo/bar yields: http://foo/bar

cw-relative-i345 <>

resolved against http://foo/bar#ref yields: http://foo/bar

cw-relative-i346 <>

resolved against http://foo/bar# yields: http://foo/bar

cw-relative-i347 < another >

another

another resolved against http://foo/bar yields: http://foo/ another

cw-relative-i348 < . >

.

. resolved against http://foo/bar yields: http://foo/ .

cw-relative-i349 < \t >

\t

\t resolved against http://foo/bar yields: http://foo/ \t

cw-relative-i350 <http:path>

http:path

http:path resolved against http://host/a yields: http:path

cw-relative-i351 <http:path>

http:path

http:path resolved against http://host/a/ yields: http:path

cw-relative-i352 <http:/path>

http:/path

http:/path resolved against http://host/a yields: http:/path

cw-relative-i353 <HTTP:/path>

HTTP:/path

HTTP:/path resolved against http://host/a yields: HTTP:/path

cw-relative-i354 <https:host2>

https:host2

https:host2 resolved against http://host/a yields: https:host2

cw-relative-i355 <htto:/host2>

htto:/host2

htto:/host2 resolved against http://host/a yields: htto:/host2

cw-relative-i356 </b/c/d>

/b/c/d

/b/c/d resolved against http://host/a yields: http://host/b/c/d

cw-relative-i357 <\\b\\c\\d>

\\b\\c\\d

\\b\\c\\d resolved against http://host/a yields: http://host/\\b\\c\\d

cw-relative-i358 </b/../c>

/b/../c

/b/../c resolved against http://host/a yields: http://host/c

cw-relative-i359 </b/../c>

/b/../c

/b/../c resolved against http://host/a?b#c yields: http://host/c

cw-relative-i360 <\\b/../c?x#y>

\\b/../c?x#y

\\b/../c?x#y resolved against http://host/a yields: http://host/c?x#y

cw-relative-i361 </b/../c?x#y>

/b/../c?x#y

/b/../c?x#y resolved against http://host/a?b#c yields: http://host/c?x#y

cw-relative-i362 <b>

b

b resolved against http://host/a yields: http://host/b

cw-relative-i363 <bc/de>

bc/de

bc/de resolved against http://host/a yields: http://host/bc/de

cw-relative-i364 <bc/de?query#ref>

bc/de?query#ref

bc/de?query#ref resolved against http://host/a/ yields: http://host/a/bc/de?query#ref

cw-relative-i365 <.>

.

. resolved against http://host/a/ yields: http://host/a/

cw-relative-i366 <..>

..

.. resolved against http://host/a/ yields: http://host/

cw-relative-i367 <./..>

./..

./.. resolved against http://host/a/ yields: http://host/

cw-relative-i368 <../.>

../.

../. resolved against http://host/a/ yields: http://host/

cw-relative-i369 <././.>

././.

././. resolved against http://host/a/ yields: http://host/a/

cw-relative-i370 <../../../foo>

../../../foo

../../../foo resolved against http://host/a?query#ref yields: http://host/foo

cw-relative-i371 <?foo=bar>

?foo=bar

?foo=bar resolved against http://host/a yields: http://host/a?foo=bar

cw-relative-i372 <?>

?

? resolved against http://host/a?x=y#z yields: http://host/a?

cw-relative-i373 <?foo=bar#com>

?foo=bar#com

?foo=bar#com resolved against http://host/a?x=y#z yields: http://host/a?foo=bar#com

cw-relative-i374 <#ref>

#ref

#ref resolved against http://host/a yields: http://host/a#ref

cw-relative-i375 <#>

#

# resolved against http://host/a#b yields: http://host/a#

cw-relative-i376 <#bye>

#bye

#bye resolved against http://host/a?foo=bar#hello yields: http://host/a?foo=bar#bye

cw-relative-i377 <baz.html>

baz.html

baz.html resolved against data:foobar yields: data:baz.html

cw-relative-i378 <data:baz>

data:baz

data:baz resolved against data:foobar yields: data:baz

cw-relative-i379 <data:/base>

data:/base

data:/base resolved against data:foobar yields: data:/base

cw-relative-i380 <http://host/>

http://host/

http://host/ resolved against data:foobar yields: http://host/

cw-relative-i381 <http:host>

http:host

http:host resolved against data:foobar yields: http:host

cw-relative-i382 <./asd:fgh>

./asd:fgh

./asd:fgh resolved against http://foo/bar yields: http://foo/asd:fgh

cw-relative-i383 <:foo>

:foo

:foo resolved against http://foo/bar yields: http://foo/:foo

cw-relative-i384 < hello world>

hello world

hello world resolved against http://foo/bar yields: http://foo/ hello world

cw-relative-i385 <:foo>

:foo

:foo resolved against data:asdf yields: data::foo

cw-relative-i386 <;foo>

;foo

;foo resolved against http://host/a yields: http://host/;foo

cw-relative-i387 <;foo>

;foo

;foo resolved against http://host/a; yields: http://host/;foo

cw-relative-i388 <;/../bar>

;/../bar

;/../bar resolved against http://host/a yields: http://host/bar

cw-relative-i389 <//another>

//another

//another resolved against http://host/a yields: http://another

cw-relative-i390 <//another/path?query#ref>

//another/path?query#ref

//another/path?query#ref resolved against http://host/a yields: http://another/path?query#ref

cw-relative-i391 <///another/path>

///another/path

///another/path resolved against http://host/a yields: http:///another/path

cw-relative-i392 <//Another\\path>

//Another\\path

//Another\\path resolved against http://host/a yields: http://Another\\path

cw-relative-i393 <//>

//

// resolved against http://host/a yields: http://

cw-relative-i394 <\\/another/path>

\\/another/path

\\/another/path resolved against http://host/a yields: http://host/\\/another/path

cw-relative-i395 </\\Another\\path>

/\\Another\\path

/\\Another\\path resolved against http://host/a yields: http://host/\\Another\\path

Test cases from Webkit's fast/url/scheme.js

Test cases from Webkit's fast/url/segments-from-data-url.js

cw-segments-from-data-url-i398 <http://user:pass@foo:21/bar;par?b#c>

http://user:pass@foo:21/bar;par?b#c

http://user:pass@foo:21/bar;par?b#c resolved against data:text/plain,baseURL yields: http://user:pass@foo:21/bar;par?b#c

cw-segments-from-data-url-i399 <http:foo.com>

http:foo.com

http:foo.com resolved against data:text/plain,baseURL yields: http:foo.com

cw-segments-from-data-url-i401 < foo.com >

foo.com

foo.com resolved against data:text/plain,baseURL yields: data:text/ foo.com

cw-segments-from-data-url-i403 <http://f:21/ b ? d # e >

http://f:21/ b ? d # e

http://f:21/ b ? d # e resolved against data:text/plain,baseURL yields: http://f:21/ b ? d # e

cw-segments-from-data-url-i404 <http://f:/c>

http://f:/c

http://f:/c resolved against data:text/plain,baseURL yields: http://f:/c

cw-segments-from-data-url-i405 <http://f:0/c>

http://f:0/c

http://f:0/c resolved against data:text/plain,baseURL yields: http://f:0/c

cw-segments-from-data-url-i406 <http://f:00000000000000/c>

http://f:00000000000000/c

http://f:00000000000000/c resolved against data:text/plain,baseURL yields: http://f:00000000000000/c

cw-segments-from-data-url-i407 <http://f:00000000000000000000080/c>

http://f:00000000000000000000080/c

http://f:00000000000000000000080/c resolved against data:text/plain,baseURL yields: http://f:00000000000000000000080/c

cw-segments-from-data-url-i408 <http://f:b/c>

http://f:b/c

http://f:b/c resolved against data:text/plain,baseURL yields: http://f:b/c

cw-segments-from-data-url-i409 <http://f: /c>

http://f: /c

http://f: /c resolved against data:text/plain,baseURL yields: http://f: /c

cw-segments-from-data-url-i411 <http://f:fifty-two/c>

http://f:fifty-two/c

http://f:fifty-two/c resolved against data:text/plain,baseURL yields: http://f:fifty-two/c

cw-segments-from-data-url-i412 <http://f:999999/c>

http://f:999999/c

http://f:999999/c resolved against data:text/plain,baseURL yields: http://f:999999/c

cw-segments-from-data-url-i413 <http://f: 21 / b ? d # e >

http://f: 21 / b ? d # e

http://f: 21 / b ? d # e resolved against data:text/plain,baseURL yields: http://f: 21 / b ? d # e

cw-segments-from-data-url-i414 <>

resolved against data:text/plain,baseURL yields: data:text/plain,baseURL

cw-segments-from-data-url-i416 <:foo.com/>

:foo.com/

:foo.com/ resolved against data:text/plain,baseURL yields: data:text/:foo.com/

cw-segments-from-data-url-i417 <:foo.com\\>

:foo.com\\

:foo.com\\ resolved against data:text/plain,baseURL yields: data:text/:foo.com\\

cw-segments-from-data-url-i418 <:>

:

: resolved against data:text/plain,baseURL yields: data:text/:

cw-segments-from-data-url-i419 <:a>

:a

:a resolved against data:text/plain,baseURL yields: data:text/:a

cw-segments-from-data-url-i420 <:/>

:/

:/ resolved against data:text/plain,baseURL yields: data:text/:/

cw-segments-from-data-url-i421 <:\\>

:\\

:\\ resolved against data:text/plain,baseURL yields: data:text/:\\

cw-segments-from-data-url-i422 <:#>

:#

:# resolved against data:text/plain,baseURL yields: data:text/:#

cw-segments-from-data-url-i423 <#>

#

# resolved against data:text/plain,baseURL yields: data:text/plain,baseURL#

cw-segments-from-data-url-i424 <#/>

#/

#/ resolved against data:text/plain,baseURL yields: data:text/plain,baseURL#/

cw-segments-from-data-url-i425 <#\\>

#\\

#\\ resolved against data:text/plain,baseURL yields: data:text/plain,baseURL#\\

cw-segments-from-data-url-i426 <#;?>

#;?

#;? resolved against data:text/plain,baseURL yields: data:text/plain,baseURL#;?

cw-segments-from-data-url-i427 <?>

?

? resolved against data:text/plain,baseURL yields: data:text/plain,baseURL?

cw-segments-from-data-url-i428 </>

/

/ resolved against data:text/plain,baseURL yields: data:/

cw-segments-from-data-url-i429 <:23>

:23

:23 resolved against data:text/plain,baseURL yields: data:text/:23

cw-segments-from-data-url-i430 </:23>

/:23

/:23 resolved against data:text/plain,baseURL yields: data:/:23

cw-segments-from-data-url-i431 <//>

//

// resolved against data:text/plain,baseURL yields: data://

cw-segments-from-data-url-i432 <::>

::

:: resolved against data:text/plain,baseURL yields: data:text/::

cw-segments-from-data-url-i433 <::23>

::23

::23 resolved against data:text/plain,baseURL yields: data:text/::23

cw-segments-from-data-url-i434 <foo://>

foo://

foo:// resolved against data:text/plain,baseURL yields: foo://

cw-segments-from-data-url-i435 <http://a:b@c:29/d>

http://a:b@c:29/d

http://a:b@c:29/d resolved against data:text/plain,baseURL yields: http://a:b@c:29/d

cw-segments-from-data-url-i436 <http::@c:29>

http::@c:29

http::@c:29 resolved against data:text/plain,baseURL yields: http::@c:29

cw-segments-from-data-url-i437 <http://&amp;a:foo(b]c@d:2/>

http://&amp;a:foo(b]c@d:2/

http://&amp;a:foo(b]c@d:2/ resolved against data:text/plain,baseURL yields: http://&amp;a:foo(b]c@d:2/

cw-segments-from-data-url-i438 <http://::@c@d:2>

http://::@c@d:2

http://::@c@d:2 resolved against data:text/plain,baseURL yields: http://::@c@d:2

cw-segments-from-data-url-i439 <http://foo.com:b@d/>

http://foo.com:b@d/

http://foo.com:b@d/ resolved against data:text/plain,baseURL yields: http://foo.com:b@d/

cw-segments-from-data-url-i440 <http://foo.com/\\@>

http://foo.com/\\@

http://foo.com/\\@ resolved against data:text/plain,baseURL yields: http://foo.com/\\@

cw-segments-from-data-url-i441 <http:\\\\foo.com\\>

http:\\\\foo.com\\

http:\\\\foo.com\\ resolved against data:text/plain,baseURL yields: http:\\\\foo.com\\

cw-segments-from-data-url-i442 <http:\\\\a\\b:c\\d@foo.com\\>

http:\\\\a\\b:c\\d@foo.com\\

http:\\\\a\\b:c\\d@foo.com\\ resolved against data:text/plain,baseURL yields: http:\\\\a\\b:c\\d@foo.com\\

cw-segments-from-data-url-i443 <foo:/>

foo:/

foo:/ resolved against data:text/plain,baseURL yields: foo:/

cw-segments-from-data-url-i444 <foo:/bar.com/>

foo:/bar.com/

foo:/bar.com/ resolved against data:text/plain,baseURL yields: foo:/bar.com/

cw-segments-from-data-url-i445 <foo://///////>

foo://///////

foo:///////// resolved against data:text/plain,baseURL yields: foo://///////

cw-segments-from-data-url-i446 <foo://///////bar.com/>

foo://///////bar.com/

foo://///////bar.com/ resolved against data:text/plain,baseURL yields: foo://///////bar.com/

cw-segments-from-data-url-i447 <foo:////://///>

foo:////://///

foo:////:///// resolved against data:text/plain,baseURL yields: foo:////://///

cw-segments-from-data-url-i448 <c:/foo>

c:/foo

c:/foo resolved against data:text/plain,baseURL yields: c:/foo

cw-segments-from-data-url-i449 <//foo/bar>

//foo/bar

//foo/bar resolved against data:text/plain,baseURL yields: data://foo/bar

cw-segments-from-data-url-i450 <http://foo/path;a??e#f#g>

http://foo/path;a??e#f#g

http://foo/path;a??e#f#g resolved against data:text/plain,baseURL yields: http://foo/path;a??e#f#g

cw-segments-from-data-url-i451 <http://foo/abcd?efgh?ijkl>

http://foo/abcd?efgh?ijkl

http://foo/abcd?efgh?ijkl resolved against data:text/plain,baseURL yields: http://foo/abcd?efgh?ijkl

cw-segments-from-data-url-i452 <http://foo/abcd#foo?bar>

http://foo/abcd#foo?bar

http://foo/abcd#foo?bar resolved against data:text/plain,baseURL yields: http://foo/abcd#foo?bar

cw-segments-from-data-url-i453 <[61:24:74]:98>

[61:24:74]:98

[61:24:74]:98 resolved against data:text/plain,baseURL yields: [61:24:74]:98

cw-segments-from-data-url-i454 <http://[61:27]:98>

http://[61:27]:98

http://[61:27]:98 resolved against data:text/plain,baseURL yields: http://[61:27]:98

cw-segments-from-data-url-i455 <http:[61:27]/:foo>

http:[61:27]/:foo

http:[61:27]/:foo resolved against data:text/plain,baseURL yields: http:[61:27]/:foo

cw-segments-from-data-url-i456 <http://[1::2]:3:4>

http://[1::2]:3:4

http://[1::2]:3:4 resolved against data:text/plain,baseURL yields: http://[1::2]:3:4

cw-segments-from-data-url-i457 <http://2001::1>

http://2001::1

http://2001::1 resolved against data:text/plain,baseURL yields: http://2001::1

cw-segments-from-data-url-i458 <http://[2001::1>

http://[2001::1

http://[2001::1 resolved against data:text/plain,baseURL yields: http://[2001::1

cw-segments-from-data-url-i459 <http://2001::1]>

http://2001::1]

http://2001::1] resolved against data:text/plain,baseURL yields: http://2001::1]

cw-segments-from-data-url-i460 <http://2001::1]:80>

http://2001::1]:80

http://2001::1]:80 resolved against data:text/plain,baseURL yields: http://2001::1]:80

cw-segments-from-data-url-i461 <http://[2001::1]>

http://[2001::1]

http://[2001::1] resolved against data:text/plain,baseURL yields: http://[2001::1]

cw-segments-from-data-url-i462 <http://[2001::1]:80>

http://[2001::1]:80

http://[2001::1]:80 resolved against data:text/plain,baseURL yields: http://[2001::1]:80

cw-segments-from-data-url-i463 <http://[[::]]>

http://[[::]]

http://[[::]] resolved against data:text/plain,baseURL yields: http://[[::]]

Test cases from Webkit's fast/url/segments.js

cw-segments-i464 <http://user:pass@foo:21/bar;par?b#c>

http://user:pass@foo:21/bar;par?b#c

http://user:pass@foo:21/bar;par?b#c resolved against http://www.example.com/foo/bar yields: http://user:pass@foo:21/bar;par?b#c

cw-segments-i465 <http:foo.com>

http:foo.com

http:foo.com resolved against http://www.example.com/foo/bar yields: http:foo.com

cw-segments-i467 < foo.com >

foo.com

foo.com resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/ foo.com

cw-segments-i469 <http://f:21/ b ? d # e >

http://f:21/ b ? d # e

http://f:21/ b ? d # e resolved against http://www.example.com/foo/bar yields: http://f:21/ b ? d # e

cw-segments-i470 <http://f:/c>

http://f:/c

http://f:/c resolved against http://www.example.com/foo/bar yields: http://f:/c

cw-segments-i471 <http://f:0/c>

http://f:0/c

http://f:0/c resolved against http://www.example.com/foo/bar yields: http://f:0/c

cw-segments-i472 <http://f:00000000000000/c>

http://f:00000000000000/c

http://f:00000000000000/c resolved against http://www.example.com/foo/bar yields: http://f:00000000000000/c

cw-segments-i473 <http://f:00000000000000000000080/c>

http://f:00000000000000000000080/c

http://f:00000000000000000000080/c resolved against http://www.example.com/foo/bar yields: http://f:00000000000000000000080/c

cw-segments-i474 <http://f:b/c>

http://f:b/c

http://f:b/c resolved against http://www.example.com/foo/bar yields: http://f:b/c

cw-segments-i475 <http://f: /c>

http://f: /c

http://f: /c resolved against http://www.example.com/foo/bar yields: http://f: /c

cw-segments-i477 <http://f:fifty-two/c>

http://f:fifty-two/c

http://f:fifty-two/c resolved against http://www.example.com/foo/bar yields: http://f:fifty-two/c

cw-segments-i478 <http://f:999999/c>

http://f:999999/c

http://f:999999/c resolved against http://www.example.com/foo/bar yields: http://f:999999/c

cw-segments-i479 <http://f: 21 / b ? d # e >

http://f: 21 / b ? d # e

http://f: 21 / b ? d # e resolved against http://www.example.com/foo/bar yields: http://f: 21 / b ? d # e

cw-segments-i480 <>

resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/bar

cw-segments-i482 <:foo.com/>

:foo.com/

:foo.com/ resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:foo.com/

cw-segments-i483 <:foo.com\\>

:foo.com\\

:foo.com\\ resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:foo.com\\

cw-segments-i484 <:>

:

: resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:

cw-segments-i485 <:a>

:a

:a resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:a

cw-segments-i486 <:/>

:/

:/ resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:/

cw-segments-i487 <:\\>

:\\

:\\ resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:\\

cw-segments-i488 <:#>

:#

:# resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:#

cw-segments-i489 <#>

#

# resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/bar#

cw-segments-i490 <#/>

#/

#/ resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/bar#/

cw-segments-i491 <#\\>

#\\

#\\ resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/bar#\\

cw-segments-i492 <#;?>

#;?

#;? resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/bar#;?

cw-segments-i493 <?>

?

? resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/bar?

cw-segments-i494 </>

/

/ resolved against http://www.example.com/foo/bar yields: http://www.example.com/

cw-segments-i495 <:23>

:23

:23 resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/:23

cw-segments-i496 </:23>

/:23

/:23 resolved against http://www.example.com/foo/bar yields: http://www.example.com/:23

cw-segments-i497 <//>

//

// resolved against http://www.example.com/foo/bar yields: http://

cw-segments-i498 <::>

::

:: resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/::

cw-segments-i499 <::23>

::23

::23 resolved against http://www.example.com/foo/bar yields: http://www.example.com/foo/::23

cw-segments-i500 <foo://>

foo://

foo:// resolved against http://www.example.com/foo/bar yields: foo://

cw-segments-i501 <http://a:b@c:29/d>

http://a:b@c:29/d

http://a:b@c:29/d resolved against http://www.example.com/foo/bar yields: http://a:b@c:29/d

cw-segments-i502 <http::@c:29>

http::@c:29

http::@c:29 resolved against http://www.example.com/foo/bar yields: http::@c:29

cw-segments-i503 <http://&amp;a:foo(b]c@d:2/>

http://&amp;a:foo(b]c@d:2/

http://&amp;a:foo(b]c@d:2/ resolved against http://www.example.com/foo/bar yields: http://&amp;a:foo(b]c@d:2/

cw-segments-i504 <http://::@c@d:2>

http://::@c@d:2

http://::@c@d:2 resolved against http://www.example.com/foo/bar yields: http://::@c@d:2

cw-segments-i505 <http://foo.com:b@d/>

http://foo.com:b@d/

http://foo.com:b@d/ resolved against http://www.example.com/foo/bar yields: http://foo.com:b@d/

cw-segments-i506 <http://foo.com/\\@>

http://foo.com/\\@

http://foo.com/\\@ resolved against http://www.example.com/foo/bar yields: http://foo.com/\\@

cw-segments-i507 <http:\\\\foo.com\\>

http:\\\\foo.com\\

http:\\\\foo.com\\ resolved against http://www.example.com/foo/bar yields: http:\\\\foo.com\\

cw-segments-i508 <http:\\\\a\\b:c\\d@foo.com\\>

http:\\\\a\\b:c\\d@foo.com\\

http:\\\\a\\b:c\\d@foo.com\\ resolved against http://www.example.com/foo/bar yields: http:\\\\a\\b:c\\d@foo.com\\

cw-segments-i509 <foo:/>

foo:/

foo:/ resolved against http://www.example.com/foo/bar yields: foo:/

cw-segments-i510 <foo:/bar.com/>

foo:/bar.com/

foo:/bar.com/ resolved against http://www.example.com/foo/bar yields: foo:/bar.com/

cw-segments-i511 <foo://///////>

foo://///////

foo:///////// resolved against http://www.example.com/foo/bar yields: foo://///////

cw-segments-i512 <foo://///////bar.com/>

foo://///////bar.com/

foo://///////bar.com/ resolved against http://www.example.com/foo/bar yields: foo://///////bar.com/

cw-segments-i513 <foo:////://///>

foo:////://///

foo:////:///// resolved against http://www.example.com/foo/bar yields: foo:////://///

cw-segments-i514 <c:/foo>

c:/foo

c:/foo resolved against http://www.example.com/foo/bar yields: c:/foo

cw-segments-i515 <//foo/bar>

//foo/bar

//foo/bar resolved against http://www.example.com/foo/bar yields: http://foo/bar

cw-segments-i516 <http://foo/path;a??e#f#g>

http://foo/path;a??e#f#g

http://foo/path;a??e#f#g resolved against http://www.example.com/foo/bar yields: http://foo/path;a??e#f#g

cw-segments-i517 <http://foo/abcd?efgh?ijkl>

http://foo/abcd?efgh?ijkl

http://foo/abcd?efgh?ijkl resolved against http://www.example.com/foo/bar yields: http://foo/abcd?efgh?ijkl

cw-segments-i518 <http://foo/abcd#foo?bar>

http://foo/abcd#foo?bar

http://foo/abcd#foo?bar resolved against http://www.example.com/foo/bar yields: http://foo/abcd#foo?bar

cw-segments-i519 <[61:24:74]:98>

[61:24:74]:98

[61:24:74]:98 resolved against http://www.example.com/foo/bar yields: [61:24:74]:98

cw-segments-i520 <http://[61:27]:98>

http://[61:27]:98

http://[61:27]:98 resolved against http://www.example.com/foo/bar yields: http://[61:27]:98

cw-segments-i521 <http:[61:27]/:foo>

http:[61:27]/:foo

http:[61:27]/:foo resolved against http://www.example.com/foo/bar yields: http:[61:27]/:foo

cw-segments-i522 <http://[1::2]:3:4>

http://[1::2]:3:4

http://[1::2]:3:4 resolved against http://www.example.com/foo/bar yields: http://[1::2]:3:4

cw-segments-i523 <http://2001::1>

http://2001::1

http://2001::1 resolved against http://www.example.com/foo/bar yields: http://2001::1

cw-segments-i524 <http://[2001::1>

http://[2001::1

http://[2001::1 resolved against http://www.example.com/foo/bar yields: http://[2001::1

cw-segments-i525 <http://2001::1]>

http://2001::1]

http://2001::1] resolved against http://www.example.com/foo/bar yields: http://2001::1]

cw-segments-i526 <http://2001::1]:80>

http://2001::1]:80

http://2001::1]:80 resolved against http://www.example.com/foo/bar yields: http://2001::1]:80

cw-segments-i527 <http://[2001::1]>

http://[2001::1]

http://[2001::1] resolved against http://www.example.com/foo/bar yields: http://[2001::1]

cw-segments-i528 <http://[2001::1]:80>

http://[2001::1]:80

http://[2001::1]:80 resolved against http://www.example.com/foo/bar yields: http://[2001::1]:80

cw-segments-i529 <http://[[::]]>

http://[[::]]

http://[[::]] resolved against http://www.example.com/foo/bar yields: http://[[::]]

Test cases from Webkit's fast/url/standard-url.js

Test cases from Webkit's fast/url/trivial-segments.js

cw-trivial-segments-i557 <http://example.com/>

http://example.com/

http://example.com/ resolved against http://example.org/foo/bar yields: http://example.com/

Test cases from Webkit's fast/url/trivial.js

cw-trivial-i558 <http://example.com/>

http://example.com/

http://example.com/ resolved against http://example.org/foo/bar yields: http://example.com/

cw-trivial-i559 </>

/

/ resolved against http://example.org/foo/bar yields: http://example.org/

Test cases for normalization behaviors - see http://www.unicode.org/reports/tr15/ Figure 6 and RFC3987

cw-normalization-i570 <?value= foo bar>

?value= foo bar

?value= foo bar resolved against http://iris.test.ing/ yields: http://iris.test.ing/?value= foo bar

Misc test cases

cw-misc-i571 <example.com>

example.com

example.com resolved against http://user%40 yields: http://user%40/example.com

cw-misc-i572 <example.com>

example.com

example.com resolved against http://user%3Ainfo%40 yields: http://user%3Ainfo%40/example.com

cw-misc-i573 <example.com>

example.com

example.com resolved against http://user@ yields: http://user@/example.com

cw-misc-i574 <example.com>

example.com

example.com resolved against http://user:info@ yields: http://user:info@/example.com