diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 18:42:21 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 18:42:21 +0000 |
commit | 5b0ae24406c5cf0e587b05592256629e5aae31f2 (patch) | |
tree | e4329e9467359c593bfe3898141be19a2b2d4796 /chrome/test/data/sync_xmlhttprequest_disallowed.html | |
parent | d538c88b79c25e77f1449091238a7065bf2bf6a8 (diff) | |
download | chromium_src-5b0ae24406c5cf0e587b05592256629e5aae31f2.zip chromium_src-5b0ae24406c5cf0e587b05592256629e5aae31f2.tar.gz chromium_src-5b0ae24406c5cf0e587b05592256629e5aae31f2.tar.bz2 |
Fix renderer hang caused when a synchronous XHR is disallowed for security
reasons (via ShouldServiceReqeuest).
BUG=8401
R=jam
Review URL: http://codereview.chromium.org/56016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/sync_xmlhttprequest_disallowed.html')
-rw-r--r-- | chrome/test/data/sync_xmlhttprequest_disallowed.html | 29 |
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> |