Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / window-onerror-08.html
blobc73127854505ef9b3a87c8c14ef12accedfdb0cb
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 window.isOnErrorTest = true;
6 </script>
7 <script src="../../resources/js-test.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;
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');
22 return true;
24 </script>
25 </head>
26 <body>
27 <p>This tests that when 'window.onerror' handler is called, 'window.event' is the corresponding ErrorEvent object.</p>
28 <script>
29 throwException();
30 </script>
31 </body>
32 </html>