Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5414)

Unified Diff: chrome/test/data/sync_xmlhttprequest_disallowed.html

Issue 56016: Fix renderer hang caused when a synchronous XHR is disallowed for security... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/resource_handler.h ('k') | webkit/glue/resource_loader_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/sync_xmlhttprequest_disallowed.html
===================================================================
--- chrome/test/data/sync_xmlhttprequest_disallowed.html (revision 0)
+++ chrome/test/data/sync_xmlhttprequest_disallowed.html (revision 0)
@@ -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>
Property changes on: chrome\test\data\sync_xmlhttprequest_disallowed.html
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/renderer_host/resource_handler.h ('k') | webkit/glue/resource_loader_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698