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

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

Powered by Google App Engine
This is Rietveld 408576698