summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/reporting/resources/csp-error.https.sub.html
blob: c8830519452083108696b7b263b514a3a74ac651 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE HTML>
<html>
<head>
  <title>Notify parent on load and generate a CSP error</title>
</head>
<body>
  <script>
    addEventListener('load', () => {
     // Alert the parent frame that this frame has loaded.
     parent.postMessage('Loaded','*');

     // Trigger a CSP error, which should generate a report.
     const img = document.createElement('img');
     img.src = "/reporting/resources/fail.png";
     document.body.appendChild(img);
   });
  </script>
</body>
</html>