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

Side by Side Diff: LayoutTests/fast/events/window-onerror-12.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 </head>
7 <body>
8 <p>This test should trigger 'window.onerror' for the exception in the attrib ute handler, regardless of how it's set.</p>
9 <button onclick="null.mu()">Button.</button>
10 <script>
11 window.jsTestIsAsync = true;
12
13 function callback(errorsHandled) {
14 console.log(errorsHandled);
15 if (errorsHandled === 3 && window.testRunner)
do-not-use 2013/07/24 13:18:01 superfluous testRunner check?
Mike West 2013/07/24 15:28:32 Done.
16 finishJSTest();
17 }
18
19 DumpOnErrorArgumentValuesAndReturn(true, callback);
20
21 document.write('<button onclick="null.mu()">Button 2</button>\n');
22
23 var button3 = document.createElement("button");
24 button3.textContent = "Button 3";
25 button3.setAttribute("onclick", "null.mu()");
26 document.body.appendChild(button3);
27
28 var buttons = document.querySelectorAll('button');
29 for (var i = 0; i < buttons.length; ++i) {
30 buttons[i].click();
31 }
32 </script>
33 <script src="../js/resources/js-test-post.js"></script>
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698