Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<html>
<!--
This test verifies that child iframes of CSP documents are
permitted to execute javascript: URLs assuming the policy
allows this.
-->
<head>
<title>Test for Bug 702439</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe id="i"></iframe>
<script class="testbody" type="text/javascript">
var javascript_link_ran = false;
// check that the script in the child frame's javascript: URL ran
function checkResult()
{
is(javascript_link_ran, true,
"javascript URL didn't execute");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
document.getElementById('i').src = 'file_subframe_run_js_if_allowed.html';
</script>
</body>
</html>