blob: a59e640d7ef077ee7def9f25380eebcd415a1d15 [file] [log] [blame]
Check that window.blur() does nothing, and window.focus() only works if it is invoked from the window that opened the former. If the test passes, you should see a series of PASS messages with the last being 'All tests finished'.
This test is adopted from mozilla's tests.
PASS: The focus should not have been changed!
PASS: The focus should not have been changed!
PASS: The focus should not have been changed with URL=data:text/html,<script>opener.focus();opener.postMessage("", "*");</script>
PASS: The focus should not have been changed with URL=data:text/html,<script>blur();opener.postMessage("", "*");</script>
PASS: The last opened window should be able to get focus
PASS: All tests finished