When the first argument to window.open is missing, it uses the literal string "undefined" as the URL argument, and opens a URL ending with "undefined" in the new window.
Created attachment 15319 [details] Patch I failed to make an automated test.
Comment on attachment 15319 [details] Patch Sam has a better patch.
Created attachment 15391 [details] update patch Not much better than mitz's patch but uses the right connivence methods. I have used Mitz's manuel layout test too, as there does not seem to be a good way to automate it.
Comment on attachment 15391 [details] update patch r=me
Landed in r24018.
See also r24019 for a fix to window.showModalDialog.