Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/security/test/csp/mochitest.toml
<!DOCTYPE HTML>
<html>
<head>
<!--
test that a report-only policy that uses policy-uri is not incorrectly
-->
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe style="width:200px;height:200px;" id='testframe'></iframe>
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
var testframe = document.getElementById('testframe');
testframe.src = 'file_policyuri_regression_from_multipolicy.html';
testframe.addEventListener('load', function checkInlineScriptExecuted () {
is(this.contentDocument.getElementById('testdiv').innerHTML,
'Inline Script Executed',
'Inline script should execute (it would be blocked by the policy, but the policy is report-only)');
SimpleTest.finish();
});
</script>
</body>
</html>