blob: 0d563bde3f1a8b8382f655bb172b476c109edefc (
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
29
30
|
<!DOCTYPE HTML>
<html>
<head>
<title>Bug 1457100: Test OBJECT inherits CSP if needed</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe style="width:100%;" id="testframe"></iframe>
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
window.addEventListener("message", receiveMessage);
function receiveMessage(event) {
window.removeEventListener("message", receiveMessage);
var cspJSON = event.data.cspJSON;
ok(cspJSON.includes("img-src"), "found img-src directive");
ok(cspJSON.includes("https://bug1457100.test.com"), "found img-src value");
SimpleTest.finish();
}
document.getElementById("testframe").src = "file_object_inherit.html";
</script>
</body>
</html>
|