Roll src/third_party/WebKit e0eac24:489c548 (svn 193311:193320)
[chromium-blink-merge.git] / content / test / data / sync_xmlhttprequest_disallowed.html
blob130533f9df9e499b8999e262560318c96c215371
1 <html>
2 <head>
3 <script>
4 var success = false;
6 function OnLoad() {
7 try {
8 var request = new XMLHttpRequest();
9 request.open("GET", "file:///c:/foo.txt", false);
10 request.send(null);
11 } catch (e) {
12 success = true;
14 document.getElementById("console").appendChild(
15 document.createTextNode(success ? "SUCCESS" : "FAILURE"));
18 function DidSucceed() {
19 return success;
22 </script>
23 </head>
24 <body onload="OnLoad();">
25 This page sends a synchronous XMLHttpRequest to fetch a local file, which
26 should not be allowed.
27 <div id="console"></div>
28 </body>
29 </html>