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

Unified 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: *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 side-by-side diff with in-line comments
Download patch
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..a7eb1f7181e060433f5fa8be7ae364db00fe8e2c
--- /dev/null
+++ b/LayoutTests/fast/events/window-onerror-12.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script>
+ window.jsTestIsAsync = true;
+ window.isOnErrorTest = true;
+ </script>
+ <script src="../js/resources/js-test-pre.js"></script>
+ <script src="resources/onerror-test.js"></script>
+</head>
+<body>
+ <button onclick="null.mu()">Button.</button>
+ <script>
+ description("This test should trigger 'window.onerror' for the exception in the attribute handler, regardless of how it's set.");
+
+ function callback(errorsHandled) {
+ console.log(errorsHandled);
+ if (errorsHandled === 3)
+ 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>
« no previous file with comments | « LayoutTests/fast/events/window-onerror-11-expected.txt ('k') | LayoutTests/fast/events/window-onerror-12-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698