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

Unified Diff: LayoutTests/security/cannot-read-self-from-file.html

Issue 1140203002: make file: an effectively unique origin (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: added test Created 5 years, 7 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
Index: LayoutTests/security/cannot-read-self-from-file.html
diff --git a/LayoutTests/security/cannot-read-self-from-file.html b/LayoutTests/security/cannot-read-self-from-file.html
new file mode 100644
index 0000000000000000000000000000000000000000..473bf5b20fbc1c7ca8b4dfbe3c446770013574d1
--- /dev/null
+++ b/LayoutTests/security/cannot-read-self-from-file.html
@@ -0,0 +1,13 @@
+<html>
Mike West 2015/05/17 08:40:48 Nit: doctype.
TheJH 2015/05/17 14:35:19 Hm, ok, added one to both HTML documents. (Not one
+<head>
+<script>
+testRunner.dumpAsText();
Mike West 2015/05/17 08:40:48 Rather than setting these manually, please convert
TheJH 2015/05/17 14:35:19 Note that I need to use relative URLs because I'm
+testRunner.setAllowUniversalAccessFromFileURLs(false);
+testRunner.setAllowFileAccessFromFileURLs(false);
Mike West 2015/05/17 08:40:48 These default to `false`, don't they? Why do you n
TheJH 2015/05/17 14:35:19 See ./content/shell/common/test_runner/test_prefer
+</script>
+</head>
+<body>
+<iframe src="resources/cannot-read-self-from-file.html"></iframe>
Mike West 2015/05/17 08:40:48 Why do this work in an `<iframe>`? Wouldn't the re
TheJH 2015/05/17 14:35:19 As far as I understand, I need to create a new ori
+Documents loaded from file: shouldn't be able to access themselves via XHR.
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698