summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/frame-ancestors/reporting-frame-allows-none-meta.html
blob: c0d079f01c4b9e5f00abec76d892f8a09f1f480c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Security-Policy" content="frame-ancestors 'none'">
</head>
<body>
    <p>Reporting Frame...</p>
    <script>
        function onMessage(event) {
            var p = document.createElement(p);
            p.textContent = event.data;
            document.body.appendChild(p);
            window.parent.postMessage(event.data, "*");
        }
        window.addEventListener(
            "message",
            onMessage,
            false
        );
        window.parent.postMessage("start test", "*");
    </script>
</body>
</html>