blob: 4d2910bebddcd0b932c5220e915277173a3190a7 [file] [log] [blame]
Test setting the pathname attribute of the URL in HTMLAnchorElement.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Set pathname that starts with slash
PASS a.href is 'https://www.mydomain.com/path%20name?key=value'
Set pathname that does not start with slash and contains '?'
PASS a.href is 'https://www.mydomain.com/pa%3Fth?key=value'
Set pathname that starts with double slash and contains '#'
PASS a.href is 'https://www.mydomain.com//path%23name?key=value'
Set a pathname containing .. in it
PASS a.href is 'https://www.mydomain.com/path?key=value'
Set pathname to null
PASS a.href is 'https://www.mydomain.com/null?key=value'
Set pathname to empty string
PASS a.href is 'https://www.mydomain.com/?key=value'
Set pathname that includes illegal characters to URL that contains illegal characters.
FAIL a.href should be https://www.my|d[]()omain.com/path/testurl.html?key=value. Was https://www.my%7Cd[]%28%29omain.com/p$a%7Cth?key=value.
Set pathname to URL that contains '@' in host
PASS a.href is 'http://w@/path#ww'
Set pathname to a URL with non-hierarchical protocol
PASS a.href is 'tel:+1800-555-1212'
PASS successfullyParsed is true
TEST COMPLETE