Test window.onerror behavior