Bug 800240: Add tests against custom DOM events.

Try to reproduce regression reported in following bug without success.

https://bugzilla.mozilla.org/show_bug.cgi?id=800240