Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / open-invalid-arguments.html
blob1f8005fa1d66737d2f7f77b63119a82424a3a969
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 </head>
5 <body>
6 <script>
7 description("Checks that passing invalid strings to window.open() is properly handled.");
9 if (window.testRunner)
10 testRunner.setCanOpenWindows();
12 var nonConvertibleToString = { toString: function() { throw "Exception in toString()"; } };
13 var newWindow = null;
14 shouldThrow("newWindow = window.open(nonConvertibleToString)", "'Exception in toString()'");
15 shouldBeNull("newWindow");
16 shouldThrow("newWindow = window.open('about:blank', nonConvertibleToString)", "'Exception in toString()'");
17 shouldBeNull("newWindow");
18 shouldThrow("newWindow = window.open('about:blank', 'frameName', nonConvertibleToString)", "'Exception in toString()'");
19 shouldBeNull("newWindow");
20 </script>
21 </body>
22 </html>