OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script> |
| 5 window.isOnErrorTest = true; |
| 6 </script> |
| 7 <script src="../js/resources/js-test-pre.js"></script> |
| 8 <script src="resources/onerror-test.js"></script> |
| 9 <script> |
| 10 var onerrorMessage, onerrorURL, onerrorLine, onerrorColumn; |
| 11 window.onerror = function (message, url, line, column) { |
| 12 onerrorMessage = message; |
| 13 onerrorURL = url; |
| 14 onerrorLine = line; |
| 15 onerrorColumn = column; |
| 16 |
| 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 |
| 22 // FIXME: Update this once the event interface has columns. |
| 23 shouldBeUndefined('window.event.column'); |
| 24 return true; |
| 25 }; |
| 26 </script> |
| 27 </head> |
| 28 <body> |
| 29 <p>This tests that when 'window.onerror' handler is called, 'window.event' i
s the corresponding ErrorEvent object.</p> |
| 30 <script> |
| 31 throwException(); |
| 32 </script> |
| 33 <script src="../js/resources/js-test-post.js"></script> |
| 34 </body> |
| 35 </html> |
OLD | NEW |