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.