summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/frame-ancestors/intermediate-reporting-frame-allows-self.sub.html
blob: 6b9c91c9356d677ddfb48dc05c521954a4cafb9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!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
        );
    </script>
    <iframe src='{{GET[subframe]}}' name="deepframe"></iframe>
</body>
</html>