1 Test setting the pathname attribute of the URL in HTMLAnchorElement.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 Set pathname that starts with slash
7 PASS a.href is 'https://www.mydomain.com/path%20name?key=value'
8 Set pathname that does not start with slash and contains '?'
9 PASS a.href is 'https://www.mydomain.com/pa%3Fth?key=value'
10 Set pathname that starts with double slash and contains '#'
11 PASS a.href is 'https://www.mydomain.com//path%23name?key=value'
12 Set a pathname containing .. in it
13 PASS a.href is 'https://www.mydomain.com/path?key=value'
15 PASS a.href is 'https://www.mydomain.com/null?key=value'
16 Set pathname to empty string
17 PASS a.href is 'https://www.mydomain.com/?key=value'
18 Set pathname that includes illegal characters to URL that contains illegal characters.
19 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.
20 Set pathname to URL that contains '@' in host
21 PASS a.href is 'http://w@/path#ww'
22 Set pathname to a URL with non-hierarchical protocol
23 PASS a.href is 'tel:+1800-555-1212'
24 PASS successfullyParsed is true