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

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: *facepalm* 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>
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>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/window-onerror-07-expected.txt ('k') | LayoutTests/fast/events/window-onerror-08-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698