blob: 4f295441cdb728152bb5a6be182e577a986242bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<!DOCTYPE HTML>
<html>
<head>
<title>'self' keyword positive test</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'nonce-abc';">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script nonce='abc'>
var t_spv = async_test("Should fire violation events for every failed violation");
window.addEventListener(
"securitypolicyviolation", t_spv.unreached_func("securitypolicyviolation should not be emitted"));
window.addEventListener("load", function() {
t_spv.done();
});
</script>
<script src='positiveTest.js'></script>
<script nonce='abc'>
test(function() {
assert_true(window.cspPositiveTest);
}, "Allows scripts from the same host.");
</script>
</head>
<body>
<h1>'self' keyword positive test</h1>
<div id='log'></div>
</body>
</html>
|