blob: 3475614d41f0eeff3961e6abb424f869fc97deea [file] [log] [blame]
Tests that manipulating location properties in a just-created window object does not crash. Note: Turn off pop-up blocking to run this in-browser.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS testWindow.location.toString() is 'about:blank'
PASS testWindow.location.href is 'about:blank'
PASS testWindow.location.protocol is 'about:'
PASS testWindow.location.host is ''
PASS testWindow.location.hostname is ''
PASS testWindow.location.port is ''
PASS testWindow.location.pathname is 'blank'
PASS testWindow.location.search is ''
PASS testWindow.location.hash is ''
PASS testWindow.location.href = 'data:text/plain,b' is 'data:text/plain,b'
PASS testWindow.location.protocol = 'data' is 'data'
PASS testWindow.location.host = 'c' threw exception TypeError: Invalid URL.
PASS testWindow.location.hostname = 'd' threw exception TypeError: Invalid URL.
PASS testWindow.location.port = 'e' threw exception TypeError: Invalid URL.
PASS testWindow.location.pathname = 'f' threw exception TypeError: Invalid URL.
PASS testWindow.location.search = 'g' threw exception TypeError: Invalid URL.
PASS testWindow.location.hash = 'h' is 'h'
PASS testWindow.location.assign('data:text/plain,i') is undefined
PASS testWindow.location.replace('data:text/plain,j') is undefined
PASS testWindow.location.reload() is undefined
PASS testWindow.location.toString() is 'about:blank'
PASS testWindow.location.href is 'about:blank'
PASS testWindow.location.protocol is 'about:'
PASS testWindow.location.host is ''
PASS testWindow.location.hostname is ''
PASS testWindow.location.port is ''
PASS testWindow.location.pathname is 'blank'
PASS testWindow.location.search is ''
PASS testWindow.location.hash is ''
PASS successfullyParsed is true
TEST COMPLETE