blob: 1cf49a1c475b1ed6268d3d2b7a89c3d5d2756d67 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="connect-src http://localhost:8000"<script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<pre id="console"></pre>
<script>
function log(msg)
{
document.getElementById("console").appendChild(document.createTextNode(msg + "\n"));
}
try {
var xhr = new XMLHttpRequest;
xhr.open("GET", "http://127.0.0.1:8000/xmlhttprequest/resources/get.txt", false);
xhr.send();
log("Fail");
} catch(e) {
log("Pass");
}
</script>
<p>This test passes if the malformed meta tag doesn't cause a crash and the resource is blocked.</p>
</body>
</html>