<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Security-Policy" content="connect-src http://localhost:8000"> | |
<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 es = new EventSource("http://127.0.0.1:8000/eventsource/resources/simple-event-stream.asis"); | |
log("Fail"); | |
} catch(e) { | |
log("Pass"); | |
} | |
</script> | |
</body> | |
</html> |