blob: 8c6dbb3659a9dc6ad2b757b9f434c872b9c0f2b0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="img-src 'none'; script-src 'unsafe-inline'">
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<p>Tests that a SVG feImage element, in a user agent shadow tree, is allowed to load an external image 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 svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
userAgentShadowRoot.appendChild(svgElement);
var filterElement = document.createElementNS("http://www.w3.org/2000/svg", "filter");
svgElement.appendChild(filterElement);
var feImageElement = document.createElementNS("http://www.w3.org/2000/svg", "feImage");
filterElement.appendChild(feImageElement);
feImageElement.setAttributeNS("http://www.w3.org/1999/xlink", "href", "../../resources/abe.png");
}
runTest();
</script>
</body>
</html>