Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /content-security-policy/frame-ancestors/frame-ancestors-none-block.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/frame-ancestors-test.sub.js"></script>
</head>
<body>
<script>
async_test(t => {
window.addEventListener('securitypolicyviolation', t.step_func(function(e) {
if (e.violatedDirective === 'frame-ancestors')
assert_unreached('No securitypolicyviolation event shoud be raised in the parent.');
}));
t.step_timeout(function() { t.done(); }, 2000);
});
test = async_test("A 'frame-ancestors' CSP directive with a value 'none' should block rendering.");
sameOriginFrameShouldBeBlocked("'none'");
</script>
</body>
</html>