Revive the test for events

Use iframe to load UI.
(Rebased #582)