blob: 2e353e77ea7bf8171da6b98f9efc235ee24d6eab [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>
FAIL: The last opened window should be able to get focus
PASS: All tests finished