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

Side by Side Diff: LayoutTests/fast/events/window-onerror-exception-in-attr.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 <html>
2 <head>
3 <script src="resources/window-onerror.js">
4 </script>
5 </head>
6 <body>
7 <p>Test that window.onerror is called on window object when there is an exceptio n(excluding syntax errors)
8 in attribute handler. <a href="https://bugs.webkit.org/show_bug.cgi?id=70991">Bu g 70991</a>.</p>
9 <div id="console"></div>
10 <button id="btn1" onclick="null.m()">Button 1</button>
11 <script>
12 if (window.testRunner)
13 testRunner.dumpAsText();
14
15 function log(msg) {
16 document.getElementById("console").innerHTML += msg + "<br>";
17 }
18
19 window.onerror = function(msg, url, line)
20 {
21 url = url ? url.match( /[^\/]+\/?$/ )[0] : url;
22 log("Main frame window.onerror: " + msg + " at " + url + ":" + line);
23 return true;
24 }
25
26 document.write('<button id="btn2" onclick="null.m()">Button 2</button>\n');
27
28 var button3 = document.createElement("button");
29 button3.textContent = "Button 3";
30 button3.setAttribute("onclick", "null.m()");
31 document.body.appendChild(button3);
32
33 document.getElementById("btn1").click();
34 document.getElementById("btn2").click();
35 button3.click();
36 </script>
37 </body>
38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698