OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="resources/onerror-test.js"></script> |
| 5 <script> |
| 6 if (window.testRunner) |
| 7 testRunner.waitUntilDone(); |
| 8 |
| 9 var handledErrors = 0; |
| 10 function callback() { |
| 11 handledErrors++; |
| 12 if (handledErrors === 3 && window.testRunner) |
| 13 testRunner.notifyDone(); |
| 14 } |
| 15 |
| 16 DumpOnErrorArgumentValuesAndReturn(true, callback); |
| 17 </script> |
| 18 </head> |
| 19 <body> |
| 20 <p>This test should trigger 'window.onerror' fo the syntax error in the attr
ibute handler, regardless of how it's set.</p> |
| 21 <button onclick="%">Button.</button> |
| 22 <script> |
| 23 document.write('<button onclick="%">Button 2</button>\n'); |
| 24 |
| 25 var button3 = document.createElement("button"); |
| 26 button3.textContent = "Button 3"; |
| 27 button3.setAttribute("onclick", "%"); |
| 28 document.body.appendChild(button3); |
| 29 |
| 30 var buttons = document.querySelectorAll('button'); |
| 31 for (var i = 0; i < buttons.length; ++i) { |
| 32 buttons[i].click(); |
| 33 } |
| 34 </script> |
| 35 </body> |
| 36 </html> |
OLD | NEW |