Chromium Code Reviews| Index: LayoutTests/fast/events/window-onerror-08.html |
| diff --git a/LayoutTests/fast/events/window-onerror-08.html b/LayoutTests/fast/events/window-onerror-08.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..485ecd4eb6ed375d3cf66d288294ab01e77016c6 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/window-onerror-08.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| + <script src="../js/resources/js-test-pre.js"></script> |
| + <script src="resources/onerror-test.js"></script> |
| + <script> |
| + var errorMessage, errorURL, errorLine, errorColumn; |
| + window.onerror = function (message, url, line, column) { |
| + errorMessage = message; |
| + errorURL = url; |
| + errorLine = line; |
| + errorColumn = column; |
| + |
| + shouldBeEqualToString('window.event.type', 'error'); |
| + shouldBe('errorMessage', 'window.event.message'); |
| + shouldBe('stripURL(errorURL)', 'stripURL(window.event.filename)'); |
| + shouldBe('errorLine', 'window.event.lineno'); |
| + |
| + // FIXME: Update this once the event interface has columns. |
|
do-not-use
2013/07/24 13:18:01
Good idea.
|
| + shouldBeUndefined('window.event.column'); |
| + return true; |
| + }; |
| + </script> |
| +</head> |
| +<body> |
| + <p>This tests that when 'window.onerror' handler is called, 'window.event' is the corresponding ErrorEvent object.</p> |
| + <script> |
| + throwException(); |
| + </script> |
| + <script src="../js/resources/js-test-post.js"></script> |
| +</body> |
| +</html> |