summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/file_parent_location_js.html
blob: 9c56f499052b50e602287ccedb1860e9328f9820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<head>
  <title>Test setting parent location to javascript:</title>
  <meta http-equiv="Content-Security-Policy" content="script-src 'nonce-bug1550414'">
  <script nonce="bug1550414">
    document.addEventListener("securitypolicyviolation", (e) => {
      window.parent.postMessage({
        blockedURI: e.blockedURI,
        violatedDirective: e.violatedDirective,
        originalPolicy: e.originalPolicy,
      }, '*');
    });
  </script>
</head>
<body>
  <iframe src="file_iframe_parent_location_js.html"></iframe>
</body>
</html>