| <!DOCTYPE HTML> |
| <html> |
| |
| <head> |
| <meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-hashes' 'nonce-abc' |
| 'sha256-WZYVPzLjoxd1Cbc8gcx07ChlPmT3WP+KxkOiY0s4h8g=';"> |
| <!-- |
| 'sha256-WZYVPzLjoxd1Cbc8gcx07ChlPmT3WP+KxkOiY0s4h8g=' ==> 'javascript:opener.t1.done();' |
| --> |
| <script src='/resources/testharness.js' nonce='abc'></script> |
| <script src='/resources/testharnessreport.js' nonce='abc'></script> |
| </head> |
| |
| <body> |
| <div id='log'></div> |
| <a target="_blank" href='javascript:opener.t1.done();' id='test'> |
| <script nonce='abc'> |
| var t1 = async_test("Test that the javascript: src is allowed to run"); |
| |
| window.addEventListener('securitypolicyviolation', t1.unreached_func("Should have not raised any event")); |
| |
| document.getElementById('test').click(); |
| </script> |
| </body> |
| |
| </html> |