Commit 118ee672 authored by mkwst@chromium.org's avatar mkwst@chromium.org

CSP: Adding a test for appended script elements.

How did we not have a test for this? Crazy.

BUG=429244

Review URL: https://codereview.chromium.org/701013004

git-svn-id: svn://svn.chromium.org/blink/trunk@184908 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 08958580
CONSOLE ERROR: Refused to load the script 'http://localhost:8000/security/contentSecurityPolicy/resources/script.js' because it violates the following Content Security Policy directive: "script-src 'unsafe-inline'".
PASS
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="script-src 'unsafe-inline'">
</head>
<body>
<div id="result" text="FAIL">PASS</div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
a=document.createElement('script');
a.src='http://localhost:8000/security/contentSecurityPolicy/resources/script.js';
document.body.appendChild(a);
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment