| 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.showModalDialog() is
properly handled."); | |
| 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.showModalDialog(nonConvertibleToString)", "'Exce
ption in toString()'"); | |
| 15 shouldBeNull("newWindow"); | |
| 16 shouldThrow("newWindow = window.showModalDialog('about:blank', '', nonConvertibl
eToString)", "'Exception in toString()'"); | |
| 17 shouldBeNull("newWindow"); | |
| 18 </script> | |
| 19 </body> | |
| 20 </html> | |
| OLD | NEW |