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

Unified Diff: chrome/browser/download/save_page_browsertest.cc

Issue 1411253013: ABANDONED CL: Adding a save-page test that uses a custom referrer policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@referrer-revert-to-default
Patch Set: Reuploading with no dependencies. Created 5 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/save_page/b_with_referrer_policy_origin.htm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_page_browsertest.cc
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index fcf27876c996b2591033ab1fb27cce3c518ab213..032674a3e9a9a3f8b934f2a36c0995c00a9b1827 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -883,4 +883,22 @@ IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest,
EXPECT_EQ(1, count) << "Verify number of image/png parts in the mhtml output";
}
+// This is a test for the crash from crbug.com/550289.
+IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest,
+ ReferrerPolicyOrigin) {
+ GURL url(embedded_test_server()->GetURL(
+ "a.com", "/save_page/b_with_referrer_policy_origin.htm"));
+ ui_test_utils::NavigateToURL(browser(), url);
+
+ base::FilePath full_file_name, dir;
+ SaveCurrentTab(url, content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, "referrer", 3,
+ &dir, &full_file_name);
+ ASSERT_FALSE(HasFailure());
+
+ EXPECT_TRUE(base::PathExists(full_file_name));
+ EXPECT_TRUE(base::PathExists(dir));
+ EXPECT_TRUE(base::PathExists(dir.AppendASCII("1.css")));
+ EXPECT_TRUE(base::PathExists(dir.AppendASCII("1.png")));
+}
+
} // namespace
« no previous file with comments | « no previous file | chrome/test/data/save_page/b_with_referrer_policy_origin.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698