| Test setting the protocol attribute of the URL in a URL object . |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Basic test |
| PASS a.href is 'http-foo://www.mydomain.com/path/' |
| Set a protocol that contains ':' |
| PASS a.href is 'http://www.mydomain.com/path/' |
| Set a protocol that contains invalid characters |
| PASS a.href is 'https://www.mydomain.com/path/' |
| Set a protocol to a URL with invalid host name |
| PASS a.href is 'foo:^^' |
| Set a protocol that starts with ':' |
| PASS a.href is 'https://www.mydomain.com/path/' |
| Set protocol to null |
| PASS a.href is 'null://www.mydomain.com/path/' |
| Set protocol to empty string |
| PASS a.href is 'https://www.mydomain.com/path/' |
| Set protocol to http on malformed URL |
| PASS a.href is 'foo:??bar' |
| Set protocol to a URL which points to a local file |
| PASS a.href is 'f-oo:path' |
| Set protocol to undefined |
| PASS a.href is 'undefined://www.mydomain.com/path/' |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |