Test that window.onerror is called on window object. Bug 8519.

Main frame window.onerror: Uncaught Error: An exception at window-onerror.js:2

