blob: 93678c4699646e0a571e40164f014a9766fe9d24 [file] [log] [blame]
Test setting the port attribute of the URL in HTMLAnchorElement.
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:0/path/testurl.html?key=value'
Set port to empty string
PASS a.href is 'https://www.mydomain.com:0/path/testurl.html?key=value'
Set port to undefined
PASS a.href is 'https://www.mydomain.com:0/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