5 window
.isOnErrorTest
= true;
7 <script src=
"../../resources/js-test.js"></script>
8 <script src=
"resources/onerror-test.js"></script>
10 var onerrorMessage
, onerrorURL
, onerrorLine
, onerrorColumn
;
11 window
.onerror = function (message
, url
, line
, column
) {
12 onerrorMessage
= message
;
15 onerrorColumn
= column
;
17 shouldBeEqualToString('window.event.type', 'error');
18 shouldBe('onerrorMessage', 'window.event.message');
19 shouldBe('stripURL(onerrorURL)', 'stripURL(window.event.filename)');
20 shouldBe('onerrorLine', 'window.event.lineno');
21 shouldBe('onerrorColumn', 'window.event.colno');
27 <p>This tests that when 'window.onerror' handler is called, 'window.event' is the corresponding ErrorEvent object.
</p>