Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1021)

Side by Side Diff: LayoutTests/fast/events/window-onerror-08.html

Issue 19962008: Rewrite the 'window.onerror' tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: js-test-pre Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <script src="resources/onerror-test.js"></script>
6 <script>
7 var errorMessage, errorURL, errorLine, errorColumn;
8 window.onerror = function (message, url, line, column) {
9 errorMessage = message;
10 errorURL = url;
11 errorLine = line;
12 errorColumn = column;
13
14 shouldBeEqualToString('window.event.type', 'error');
15 shouldBe('errorMessage', 'window.event.message');
16 shouldBe('stripURL(errorURL)', 'stripURL(window.event.filename)');
17 shouldBe('errorLine', 'window.event.lineno');
18
19 // FIXME: Update this once the event interface has columns.
do-not-use 2013/07/24 13:18:01 Good idea.
20 shouldBeUndefined('window.event.column');
21 return true;
22 };
23 </script>
24 </head>
25 <body>
26 <p>This tests that when 'window.onerror' handler is called, 'window.event' i s the corresponding ErrorEvent object.</p>
27 <script>
28 throwException();
29 </script>
30 <script src="../js/resources/js-test-post.js"></script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698