summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/frame-ancestors/reporting-frame-allows-self.html
blob: 7c1186e77a42e843f9f7ba753e638efbe182ca76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
<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>