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

Unified Diff: chrome/browser/pdf/pdf_extension_test.cc

Issue 2455663004: Add test to ensure that URLs that redirect inside the PDF plugin fail to load (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | chrome/test/data/pdf/redirects_fail_test.js » ('j') | pdf/out_of_process_instance.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/pdf/pdf_extension_test.cc
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc
index 118da0eb14645ffc82b6a45bc2101669ca25a353..f32708e417046df7e1d4bbee0fdd0cbf00d75791 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -910,3 +910,10 @@ IN_PROC_BROWSER_TEST_F(PDFExtensionTest, LinkShiftLeftClick) {
const GURL& url = active_web_contents->GetURL();
ASSERT_EQ(std::string("http://www.example.com/"), url.spec());
}
+
+// Test that if the plugin tries to load a URL that redirects that it will fail
Lei Zhang 2016/11/08 01:28:10 ... _then_ it will fail?
raymes 2016/11/08 06:00:01 Done.
+// to load. This is to avoid the source origin of the document changing during
+// the redirect, which can have security implications. crbug.com/653749
Lei Zhang 2016/11/08 01:28:10 If you add https:// in the URL, then cs.chromium.o
raymes 2016/11/08 06:00:01 Done.
+IN_PROC_BROWSER_TEST_F(PDFExtensionTest, RedirectsFailInPlugin) {
+ RunTestsInFile("redirects_fail_test.js", "test.pdf");
+}
« no previous file with comments | « no previous file | chrome/test/data/pdf/redirects_fail_test.js » ('j') | pdf/out_of_process_instance.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698