Index: LayoutTests/security/resources/cannot-read-self-from-file.html |
diff --git a/LayoutTests/security/resources/cannot-read-self-from-file.html b/LayoutTests/security/resources/cannot-read-self-from-file.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d380284c51226a086a9bb2bb68c11bd4bc3246c6 |
--- /dev/null |
+++ b/LayoutTests/security/resources/cannot-read-self-from-file.html |
@@ -0,0 +1,18 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+var req = new XMLHttpRequest(); |
+req.open('GET', location); |
+try { |
+ req.send(); |
+ window.parent.postMessage('FAIL', '*'); |
+} catch (e) { |
+ window.parent.postMessage(e.name, '*'); |
+} |
+</script> |
+</head> |
+<body> |
+Documents loaded from file: shouldn't be able to access themselves via XHR. |
+</body> |
+</html> |