Test that when window.onerror handler is called, window.event is the corresponding ErrorEvent object. Bug 8519.