Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / resources / sandboxed-iframe-attribute-test.js
blob7112c73e22e2c97f436174c130a7e01060580335
1 if (window.testRunner)
2 window.testRunner.dumpAsText();
4 var failed = false;
5 var frames = 0; /* number of allowed frames that called back */
7 function fail(message)
9 setStatus("FAIL: " + message);
10 failed = true;
13 function setStatus(status)
15 if (!document.getElementById("testStatus")) {
16 var div = document.createElement('div');
17 div.id = "testStatus";
18 document.body.appendChild(div);
20 document.getElementById("testStatus").innerHTML = status;
23 function allowedCallFromSandbox()
25 ++frames;
28 function disallowedCallFromSandbox()
30 fail("disallowed script executed");
33 function disallowedFormSubmitted()
35 fail("sandboxing failed: form submitted in sandboxed frame");
38 window.onload = function()
40 var expected = document.querySelectorAll('iframe[src="resources/sandboxed-iframe-attribute-parsing-allowed.html"]').length;
41 if (frames == expected && !failed)
42 setStatus("PASS");
43 else if (!failed)
44 fail("scripting disabled in one or more frames where it should be enabled");