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

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

Issue 20679002: Add 'colno' attribute to ErrorEvent interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 window.isOnErrorTest = true; 5 window.isOnErrorTest = true;
6 </script> 6 </script>
7 <script src="../js/resources/js-test-pre.js"></script> 7 <script src="../js/resources/js-test-pre.js"></script>
8 <script src="resources/onerror-test.js"></script> 8 <script src="resources/onerror-test.js"></script>
9 <script> 9 <script>
10 var onerrorMessage, onerrorURL, onerrorLine, onerrorColumn; 10 var onerrorMessage, onerrorURL, onerrorLine, onerrorColumn;
11 window.onerror = function (message, url, line, column) { 11 window.onerror = function (message, url, line, column) {
12 onerrorMessage = message; 12 onerrorMessage = message;
13 onerrorURL = url; 13 onerrorURL = url;
14 onerrorLine = line; 14 onerrorLine = line;
15 onerrorColumn = column; 15 onerrorColumn = column;
16 16
17 shouldBeEqualToString('window.event.type', 'error'); 17 shouldBeEqualToString('window.event.type', 'error');
arv (Not doing code reviews) 2013/07/31 16:07:24 We should not be using window.event. A better app
18 shouldBe('onerrorMessage', 'window.event.message'); 18 shouldBe('onerrorMessage', 'window.event.message');
19 shouldBe('stripURL(onerrorURL)', 'stripURL(window.event.filename)'); 19 shouldBe('stripURL(onerrorURL)', 'stripURL(window.event.filename)');
20 shouldBe('onerrorLine', 'window.event.lineno'); 20 shouldBe('onerrorLine', 'window.event.lineno');
21 21 shouldBe('onerrorColumn', 'window.event.colno');
22 // FIXME: Update this once the event interface has columns.
23 shouldBeUndefined('window.event.column');
24 return true; 22 return true;
25 }; 23 };
26 </script> 24 </script>
27 </head> 25 </head>
28 <body> 26 <body>
29 <p>This tests that when 'window.onerror' handler is called, 'window.event' i s the corresponding ErrorEvent object.</p> 27 <p>This tests that when 'window.onerror' handler is called, 'window.event' i s the corresponding ErrorEvent object.</p>
30 <script> 28 <script>
31 throwException(); 29 throwException();
32 </script> 30 </script>
33 <script src="../js/resources/js-test-post.js"></script> 31 <script src="../js/resources/js-test-post.js"></script>
34 </body> 32 </body>
35 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698