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

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

Issue 100963003: Use V8TRYCATCH_FOR_V8STRINGRESOURCE() macro instead of toCoreStringWithUndefinedOrNullCheck() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove toCoreString(v8::Handle<v8::Value> value) Created 7 years 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/dom/Window/showModalDialog-invalid-arguments.html
diff --git a/LayoutTests/fast/dom/Window/showModalDialog-invalid-arguments.html b/LayoutTests/fast/dom/Window/showModalDialog-invalid-arguments.html
new file mode 100644
index 0000000000000000000000000000000000000000..04ca06cc303de3301e5fb1af1ff1d0f52497c96f
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/showModalDialog-invalid-arguments.html
@@ -0,0 +1,20 @@
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Checks that passing invalid strings to window.showModalDialog() is properly handled.");
+
+if (window.testRunner)
+ testRunner.setCanOpenWindows();
+
+var nonConvertibleToString = { toString: function() { throw "Exception in toString()"; } };
+var newWindow = null;
+shouldThrow("newWindow = window.showModalDialog(nonConvertibleToString)", "'Exception in toString()'");
+shouldBeNull("newWindow");
+shouldThrow("newWindow = window.showModalDialog('about:blank', '', nonConvertibleToString)", "'Exception in toString()'");
+shouldBeNull("newWindow");
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698