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

Unified Diff: LayoutTests/fast/js/script-tests/document-open-getter-throw-no-crash.js

Issue 249653002: document.open(): gracefully handle exception thrown on window.open access. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/js/script-tests/document-open-getter-throw-no-crash.js
diff --git a/LayoutTests/fast/js/script-tests/document-open-getter-throw-no-crash.js b/LayoutTests/fast/js/script-tests/document-open-getter-throw-no-crash.js
new file mode 100644
index 0000000000000000000000000000000000000000..b4f8ccad5ec03f1e4b0501d2ae39bc1f23903405
--- /dev/null
+++ b/LayoutTests/fast/js/script-tests/document-open-getter-throw-no-crash.js
@@ -0,0 +1,6 @@
+description("document.open() - propagate exception thrown when accessing window.open.");
+
+var frame = document.body.appendChild(document.createElement("iframe"));
+frame.contentWindow.__defineGetter__("open", function() { throw 'PASS (no crash)';});
+shouldThrow("frame.contentDocument.open(1, 1, 1, 1, 1);");
+

Powered by Google App Engine
This is Rietveld 408576698