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

Unified Diff: chrome/test/data/save_page/unauthorized-access.htm

Issue 2075273002: Resource requests from Save-Page-As should go through CanRequestURL checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: chrome/test/data/save_page/unauthorized-access.htm
diff --git a/chrome/test/data/save_page/unauthorized-access.htm b/chrome/test/data/save_page/unauthorized-access.htm
new file mode 100644
index 0000000000000000000000000000000000000000..2826319298732409d9e4dff8b7fdc09e11e27ea0
--- /dev/null
+++ b/chrome/test/data/save_page/unauthorized-access.htm
@@ -0,0 +1,16 @@
+<html>
+ <head>
+ <title>
+ Test page for saving page feature
+ </title>
+ </head>
+ <body>
+ When this page is loaded over HTTP (i.e. via embedded_test_server() from a
+ browser test), then it should be denied access to local resources, like the
+ file: URI from the img tag below. This test verifies that access to the
+ file: URI will also be forbidden when saving all resources of the page
+ during Save-Page-As-Complete-HTML.
+ <img id="resource1"
+ src="file:///path-to-be-set-at-test-runtime/should-not-save.txt"></img>
+ </body>
+</html>
Łukasz Anforowicz 2016/06/18 00:37:20 In theory I could reuse b.htm here, but a separate
asanka 2016/06/20 20:24:18 Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698