WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
test case
connect-src-xmlhttprequest-blocked.html (text/html), 552 bytes, created by
Blaze Burg
on 2015-11-20 13:22:39 PST
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Blaze Burg
Created:
2015-11-20 13:22:39 PST
Size:
552 bytes
patch
obsolete
><!DOCTYPE html> ><html> ><head> ><meta http-equiv="Content-Security-Policy" content="connect-src http://127.0.0.1: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 xhr = new XMLHttpRequest; > xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/get.txt", true); > log("Fail"); >} catch(e) { > log("Pass"); >} > ></script> ></body> ></html>
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Security-Policy" content="connect-src http://127.0.0.1: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 xhr = new XMLHttpRequest; xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/get.txt", true); log("Fail"); } catch(e) { log("Pass"); } </script> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 114317
: 265985 |
362044
|
364694