summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/sync_xmlhttprequest_disallowed.html
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/data/sync_xmlhttprequest_disallowed.html')
-rw-r--r--chrome/test/data/sync_xmlhttprequest_disallowed.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/chrome/test/data/sync_xmlhttprequest_disallowed.html b/chrome/test/data/sync_xmlhttprequest_disallowed.html
new file mode 100644
index 0000000..130533f
--- /dev/null
+++ b/chrome/test/data/sync_xmlhttprequest_disallowed.html
@@ -0,0 +1,29 @@
+<html>
+<head>
+<script>
+var success = false;
+
+function OnLoad() {
+ try {
+ var request = new XMLHttpRequest();
+ request.open("GET", "file:///c:/foo.txt", false);
+ request.send(null);
+ } catch (e) {
+ success = true;
+ }
+ document.getElementById("console").appendChild(
+ document.createTextNode(success ? "SUCCESS" : "FAILURE"));
+}
+
+function DidSucceed() {
+ return success;
+}
+
+</script>
+</head>
+<body onload="OnLoad();">
+This page sends a synchronous XMLHttpRequest to fetch a local file, which
+should not be allowed.
+<div id="console"></div>
+</body>
+</html>