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

Unified Diff: LayoutTests/fast/dom/Window/open-invalid-arguments.html

Issue 90243003: Use V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID() in V8Window::openMethodCustom() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/open-invalid-arguments-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/Window/open-invalid-arguments.html
diff --git a/LayoutTests/fast/dom/Window/open-invalid-arguments.html b/LayoutTests/fast/dom/Window/open-invalid-arguments.html
new file mode 100644
index 0000000000000000000000000000000000000000..1f8005fa1d66737d2f7f77b63119a82424a3a969
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/open-invalid-arguments.html
@@ -0,0 +1,22 @@
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Checks that passing invalid strings to window.open() is properly handled.");
+
+if (window.testRunner)
+ testRunner.setCanOpenWindows();
+
+var nonConvertibleToString = { toString: function() { throw "Exception in toString()"; } };
+var newWindow = null;
+shouldThrow("newWindow = window.open(nonConvertibleToString)", "'Exception in toString()'");
+shouldBeNull("newWindow");
+shouldThrow("newWindow = window.open('about:blank', nonConvertibleToString)", "'Exception in toString()'");
+shouldBeNull("newWindow");
+shouldThrow("newWindow = window.open('about:blank', 'frameName', nonConvertibleToString)", "'Exception in toString()'");
+shouldBeNull("newWindow");
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Window/open-invalid-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698