Chromium Code Reviews| Index: LayoutTests/fast/events/window-onerror-12.html |
| diff --git a/LayoutTests/fast/events/window-onerror-12.html b/LayoutTests/fast/events/window-onerror-12.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..68bc0cee8d291657a840c8893ec8e7a3df195ebf |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/window-onerror-12.html |
| @@ -0,0 +1,35 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| + <script src="../js/resources/js-test-pre.js"></script> |
| + <script src="resources/onerror-test.js"></script> |
| +</head> |
| +<body> |
| + <p>This test should trigger 'window.onerror' for the exception in the attribute handler, regardless of how it's set.</p> |
| + <button onclick="null.mu()">Button.</button> |
| + <script> |
| + window.jsTestIsAsync = true; |
| + |
| + function callback(errorsHandled) { |
| + console.log(errorsHandled); |
| + 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.
|
| + finishJSTest(); |
| + } |
| + |
| + DumpOnErrorArgumentValuesAndReturn(true, callback); |
| + |
| + document.write('<button onclick="null.mu()">Button 2</button>\n'); |
| + |
| + var button3 = document.createElement("button"); |
| + button3.textContent = "Button 3"; |
| + button3.setAttribute("onclick", "null.mu()"); |
| + document.body.appendChild(button3); |
| + |
| + var buttons = document.querySelectorAll('button'); |
| + for (var i = 0; i < buttons.length; ++i) { |
| + buttons[i].click(); |
| + } |
| + </script> |
| + <script src="../js/resources/js-test-post.js"></script> |
| +</body> |
| +</html> |