This test case demonstrates how it is possible for scripts to close a window that they never actually opened in Firefox 1.5rc1. See bug 297980

The open window link will attempt to open a new window with this same document loaded. With the preference to force links that open new windows to open in the same tab/window enabled, the close window link will then be able to close the current tab, although the script did not actually open it.

Open window

Close window