<!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 object 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("object");
    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>
