Make formunloadalert tests work again

- Fix the tests for beforeunloadalert
- Remove exclusion of beforeunloadalert tests
- Add a couple new tests to improve coverage