Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / script-tests / javascript-url-exception-isolation.js
blob0891c8e570c302b6ebe620fd0675cb34213b0b53
1 description("Exceptions thrown in javascript URLs should not propagate to the main script.")
3 var subframe = document.createElement("iframe");
4 document.body.appendChild(subframe);
6 var caughtException = false;
8 // Runtime exception.
9 try {
10 subframe.src = 'javascript:throw 42';
11 } catch(e) {
12 caughtException = true;
14 shouldBeFalse('caughtException');
16 // Compile-time exception.
17 try {
18 subframe.src = 'javascript:<html></html>';
19 } catch(e) {
20 caughtException = true;
22 shouldBeFalse('caughtException');