| OLD | NEW |
| (Empty) |
| 1 description("Exceptions thrown in javascript URLs should not propagate to the ma
in script.") | |
| 2 | |
| 3 var subframe = document.createElement("iframe"); | |
| 4 document.body.appendChild(subframe); | |
| 5 | |
| 6 var caughtException = false; | |
| 7 | |
| 8 // Runtime exception. | |
| 9 try { | |
| 10 subframe.src = 'javascript:throw 42'; | |
| 11 } catch(e) { | |
| 12 caughtException = true; | |
| 13 } | |
| 14 shouldBeFalse('caughtException'); | |
| 15 | |
| 16 // Compile-time exception. | |
| 17 try { | |
| 18 subframe.src = 'javascript:<html></html>'; | |
| 19 } catch(e) { | |
| 20 caughtException = true; | |
| 21 } | |
| 22 shouldBeFalse('caughtException'); | |
| OLD | NEW |