Testing no transforms on given URL
Given source URL is not transformed — Passed ( '/SearchResults?search=new&make=Buick&year=2016' == '/SearchResults?search=new&make=Buick&year=2016')
Given source URL is not transformed — Passed ( 'SearchResults?search=new&make=Buick&year=2016' == 'SearchResults?search=new&make=Buick&year=2016')
Testing full URL
Source URL = 'wss://user:pass@example.com:9999/some/path.html?foo=bar#anchor'
Parse protocol — Passed ( 'wss' == 'wss')
Parse user — Passed ( 'user' == 'user')
Parse password — Passed ( 'pass' == 'pass')
Parse host — Passed ( 'example.com' == 'example.com')
Parse port — Passed ( '9999' == '9999')
Parse path — Passed ( '/some/path.html' == '/some/path.html')
Parse query — Passed ( 'foo=bar' == 'foo=bar')
Parse query param — Passed ( 'bar' == 'bar')
Parse anchor — Passed ( 'anchor' == 'anchor')
Stringify URL — Passed ( 'wss://user:pass@example.com:9999/some/path.html?foo=bar#anchor' == 'wss://user:pass@example.com:9999/some/path.html?foo=bar#anchor')
Testing relative-absolute URL
Source URL = '/some/path.html?foo=bar#anchor'
Parse protocol — Passed ( 'https' == 'https')
Parse user — Passed ( '' == '')
Parse password — Passed ( '' == '')
Parse host — Passed ( 'rawgit.com' == 'rawgit.com')
Parse port — Passed ( '' == '')
Parse path — Passed ( '/some/path.html' == '/some/path.html')
Parse query — Passed ( 'foo=bar' == 'foo=bar')
Parse query param — Passed ( 'bar' == 'bar')
Parse anchor — Passed ( 'anchor' == 'anchor')
Stringify URL — Passed ( 'https://rawgit.com/some/path.html?foo=bar#anchor' == 'https://rawgit.com/some/path.html?foo=bar#anchor')
Testing relative URL
Source URL = 'some/path.html?foo=bar#anchor'
Parse protocol — Passed ( 'https' == 'https')
Parse user — Passed ( '' == '')
Parse password — Passed ( '' == '')
Parse host — Passed ( 'rawgit.com' == 'rawgit.com')
Parse port — Passed ( '' == '')
Parse path — Passed ( '/Mikhus/domurl/master/test/some/path.html' == '/Mikhus/domurl/master/test/some/path.html')
Parse query — Passed ( 'foo=bar' == 'foo=bar')
Parse query param — Passed ( 'bar' == 'bar')
Parse anchor — Passed ( 'anchor' == 'anchor')
Stringify URL — Passed ( 'https://rawgit.com/Mikhus/domurl/master/test/some/path.html?foo=bar#anchor' == 'https://rawgit.com/Mikhus/domurl/master/test/some/path.html?foo=bar#anchor')
Testing relative URL with upwards in path
Source URL = '../some/path.html?foo=bar#anchor'
Parse protocol — Passed ( 'https' == 'https')
Parse user — Passed ( '' == '')
Parse password — Passed ( '' == '')
Parse host — Passed ( 'rawgit.com' == 'rawgit.com')
Parse port — Passed ( '' == '')
Parse path — Passed ( '/Mikhus/domurl/master/some/path.html' == '/Mikhus/domurl/master/some/path.html')
Parse query — Passed ( 'foo=bar' == 'foo=bar')
Parse query param — Passed ( 'bar' == 'bar')
Parse anchor — Passed ( 'anchor' == 'anchor')
Stringify URL — Passed ( 'https://rawgit.com/Mikhus/domurl/master/some/path.html?foo=bar#anchor' == 'https://rawgit.com/Mikhus/domurl/master/some/path.html?foo=bar#anchor')
Testing relative URL with upwards out of base path
Source URL = '../../../../../../some/path.html?foo=bar#anchor'
Parse protocol — Passed ( 'https' == 'https')
Parse user — Passed ( '' == '')
Parse password — Passed ( '' == '')
Parse host — Passed ( 'rawgit.com' == 'rawgit.com')
Parse port — Passed ( '' == '')
Parse path — Passed ( '/some/path.html' == '/some/path.html')
Parse query — Passed ( 'foo=bar' == 'foo=bar')
Parse query param — Passed ( 'bar' == 'bar')
Parse anchor — Passed ( 'anchor' == 'anchor')
Stringify URL — Passed ( 'https://rawgit.com/some/path.html?foo=bar#anchor' == 'https://rawgit.com/some/path.html?foo=bar#anchor')
Testing query cleanup function
Url.clearQuery() — Passed ( 'http://example.com/#foo' == 'http://example.com/#foo')
Testing case sensitivity in encode-decode
constructor() — Passed ( 'http://localhost/?a=%3f' == 'http://localhost/?a=%3f')
Testing correct path encoding
Escape whitespace — Passed ( 'http://server.com/path%20with%20spaces.html' == 'http://server.com/path%20with%20spaces.html')
All tests inside a srcdoc iframe