| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta http-equiv="Content-Security-Policy" content="img-src 'none'; style-src 'none'; script-src 'unsafe-inline'"> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| </script> |
| </head> |
| <body> |
| <p>Tests that an inline stylesheet, in a user agent shadow tree, is allowed to load an image set when the page has CSP policy: <code>img-src 'none'</code>. This test PASSED if there are no console warning messages.</p> |
| <div id="shadow-host"></div> |
| <script> |
| function runTest() |
| { |
| if (!window.testRunner || !window.internals) |
| return; |
| |
| var userAgentShadowRoot = internals.ensureUserAgentShadowRoot(document.getElementById("shadow-host")); |
| var style = document.createElement("style"); |
| userAgentShadowRoot.appendChild(style); |
| |
| style.textContent = "#test1 { background-image: -webkit-image-set(url(../../resources/abe.png) 1x, url(../../resources/abe.png) 2x) }"; |
| } |
| |
| runTest(); |
| </script> |
| </body> |
| </html> |