blob: cd557b74bbedf092221a65407265dd958a950d17 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-inline'">
<script src="/js-test-resources/plugin.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<p>Tests that a HTML embed element, in a user agent shadow tree, is allowed to load a plugin when the page has CSP policy: <code>object-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 object = document.createElement("embed");
object.type = "application/x-webkit-test-netscape";
var userAgentShadowRoot = internals.ensureUserAgentShadowRoot(document.getElementById("shadow-host"));
userAgentShadowRoot.appendChild(object);
runAfterPluginLoad(null, NotifyDone);
}
runTest();
</script>
</body>
</html>