summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/reporting/resources/first-csp-report.https.sub.html
blob: 9887769128ee77717f422fe9e81ee0be23eb2ef1 (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>
<head>
<title>Bug test page 1</title>
</head>
<body>
<h1>Bug test page 1</h1>
<!-- This image will cause a CSP violation, which will trigger an immediate report -->
<img src="missing1.png">
<script>
setTimeout(()=>{
  var img = document.createElement('img');
  img.src = "missing2.png";
  // Appending this image will cause a second CSP violation, which will trigger
  // a second report.
  document.body.appendChild(img);
  location.href = "second-csp-report.https.sub.html";
}, 1);
</script>
</body>
</html>