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

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

Issue 19693006: Pass column as 4th argument to WorkerGlobalScope.onerror handler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/window-onerror1-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 function print(message, color) 7 function print(message, color)
8 { 8 {
9 var paragraph = document.createElement("div"); 9 var paragraph = document.createElement("div");
10 paragraph.appendChild(document.createTextNode(message)); 10 paragraph.appendChild(document.createTextNode(message));
11 paragraph.style.fontFamily = "monospace"; 11 paragraph.style.fontFamily = "monospace";
12 if (color) 12 if (color)
13 paragraph.style.color = color; 13 paragraph.style.color = color;
14 document.getElementById("console").appendChild(paragraph); 14 document.getElementById("console").appendChild(paragraph);
15 } 15 }
16 16
17 function test() 17 function test()
18 { 18 {
19 // must be last because the exception ends JavaScript execution 19 // must be last because the exception ends JavaScript execution
20 window.onerror = function (error, url, line) { 20 window.onerror = function (error, url, line, column) {
21 url = url ? url.match( /[^\/]+\/?$/ )[0] : url; 21 url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
22 print("PASS: caught global error: " + error + " at " + url + ":" + line, "green"); 22 print("PASS: caught global error: " + error + " at " + url + ", line: " + line + ", column: " + column, "green");
23 return true; 23 return true;
24 }; 24 };
25 hahaha_good_luck_finding_me(); // caught by window.onerror 25 hahaha_good_luck_finding_me(); // caught by window.onerror
26 } 26 }
27 </script> 27 </script>
28 </head> 28 </head>
29 <body onload="test();"> 29 <body onload="test();">
30 <p>This page tests setting onerror handlers through the DOM. If it passes, you w ill 30 <p>This page tests setting onerror handlers through the DOM. If it passes, you w ill
31 see "PASS" messages below.<a href="https://bugs.webkit.org/show_bug.cgi?id=85 19">Bug 8519</a>.</p> 31 see "PASS" messages below.<a href="https://bugs.webkit.org/show_bug.cgi?id=85 19">Bug 8519</a>.</p>
32 <hr> 32 <hr>
33 <div id='console'></div> 33 <div id='console'></div>
34 </body> 34 </body>
35 </html> 35 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/window-onerror1-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698