blob: 7b54a5e2631263460532c62a8172022a384c1eb9 [file] [log] [blame]
Test getting the username attribute of a URL object.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
One-parameter constructor - valid URL
PASS url.href is 'http://user:pass@example.com/path?query#fragment'
One-parameter constructor - invalid URL should throw
PASS url = new URL("%^$#") threw exception TypeError: Type error.
One-parameter constructor - relative URL not valid against default base
PASS url = new URL("foobar") threw exception TypeError: Type error.
URL with string base
PASS url.href is 'http://example.com/path/to/nowhere?ok'
URL with URL base
PASS url.href is 'http://example.com/path/to/nowhere?ok'
URL with URL base that itself has a base
PASS url.href is 'http://example.com/are/we/nowhere?ok'
PASS successfullyParsed is true
TEST COMPLETE