blob: 35376de9c703cce6b75b3972ea1da6a6d626a92b [file] [log] [blame]
Test setting the port attribute of the URL in a URL object.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Default port as number
PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value'
Default port as string
PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value'
Set port to 0
PASS a.href is 'https://www.mydomain.com:0/path/testurl.html?key=value'
Set port to non-number
PASS a.href is 'https://www.mydomain.com:4/path/testurl.html?key=value'
Set port to null
PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value'
Set port to empty string
PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value'
Set port to undefined
PASS a.href is 'https://www.mydomain.com/path/testurl.html?key=value'
Set port to URL with foo: protocol
PASS a.href is 'foo://bar:50/'
PASS successfullyParsed is true
TEST COMPLETE