Bug 305085 - add a test for beforeunload uses, r=jaws

--HG--
extra : rebase_source : 56f5d53be23a811d9a5eeec68a089824f538942b
extra : histedit_source : af42dfab71d3c56a54ff337b0c02e05dde856572
Bug 305085 - fix permitUnload usages in tab/window closing so we never show a permitUnload twice for the same page, r=jaws

--HG--
extra : rebase_source : 29d6d43e3ee8d831b3debc97a1e12c422e5c0bb8
extra : histedit_source : cd3004e8f6da17acb8af122b0755bf85e3d8fb0c