1Test setting the protocol attribute of the URL in HTMLAnchorElement .
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6Basic test
7PASS a.href is 'http-foo://www.mydomain.com/path/'
8Set a protocol that contains ':'
9PASS a.href is 'http://www.mydomain.com/path/'
10Set a protocol that contains invalid characters
11PASS a.href is 'https://www.mydomain.com/path/'
12Set a protocol to a URL with invalid host name
13PASS a.href is 'foo:^^'
14Set a protocol that starts with ':'
15PASS a.href is 'https://www.mydomain.com/path/'
16Set protocol to null
17PASS a.href is 'https://www.mydomain.com/path/'
18Set protocol to empty string
19PASS a.href is 'https://www.mydomain.com/path/'
20Set protocol to http on malformed URL
21PASS a.href is 'http:??bar'
22Set protocol to a URL which points to a local file
23PASS a.href is 'f-oo:path'
24Set protocol to undefined
25PASS a.href is 'undefined://www.mydomain.com/path/'
26PASS successfullyParsed is true
27
28TEST COMPLETE
29
30