OLD | NEW |
(Empty) | |
| 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 ha
ndled."); |
| 8 |
| 9 if (window.testRunner) |
| 10 testRunner.setCanOpenWindows(); |
| 11 |
| 12 var nonConvertibleToString = { toString: function() { throw "Exception in toStri
ng()"; } }; |
| 13 var newWindow = null; |
| 14 shouldThrow("newWindow = window.open(nonConvertibleToString)", "'Exception in to
String()'"); |
| 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', nonConvertibleT
oString)", "'Exception in toString()'"); |
| 19 shouldBeNull("newWindow"); |
| 20 </script> |
| 21 </body> |
| 22 </html> |
OLD | NEW |