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

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

Issue 1371533002: Remove "recursive" parameter from WebPageSerializer::serialize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-serialization-complete-serialization
Patch Set: Reverted VerifySavePackageExpectations changes. Created 5 years, 3 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
« no previous file with comments | « no previous file | chrome/test/data/downloads/iframe-src-is-a-download.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 4a71ff5a825f030d7e34ca9438067d1f7eb055a6..973fc57f1c5d7174db968642c0f92cc440c02e9f 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -774,6 +774,33 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SavePageBrowserTest_NonMHTML) {
EXPECT_EQ("foo", contents);
}
+// Disabled on Windows due to flakiness. http://crbug.com/162323
dcheng 2015/09/25 21:28:21 Let's try unconditionally enabling this test, so w
Łukasz Anforowicz 2015/09/25 21:38:28 Done.
+#if defined(OS_WIN)
+#define MAYBE_SaveDownloadableIFrame DISABLED_SaveDownloadableIFrame
+#else
+#define MAYBE_SaveDownloadableIFrame SaveDownloadableIFrame
+#endif
+// Test that we don't crash when the page contains an iframe that
+// was handled as a download (http://crbug.com/42212).
+IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, MAYBE_SaveDownloadableIFrame) {
+ GURL url = URLRequestMockHTTPJob::GetMockUrl(
+ base::FilePath(FILE_PATH_LITERAL("downloads"))
+ .AppendASCII("iframe-src-is-a-download.htm"));
+ ui_test_utils::NavigateToURL(browser(), url);
+
+ // Wait for and then dismiss the non-save-page-as-related download item
+ // (the one associated with downloading of "thisdayinhistory.xls" file).
+ VerifySavePackageExpectations(browser(), url);
+ GetDownloadManager()->RemoveAllDownloads();
+
+ base::FilePath full_file_name, dir;
+ SaveCurrentTab(url, content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML,
+ "iframe-src-is-a-download", 2, &dir, &full_file_name);
+ ASSERT_FALSE(HasFailure());
+
+ EXPECT_TRUE(base::PathExists(full_file_name));
+}
+
class SavePageSitePerProcessBrowserTest : public SavePageBrowserTest {
public:
SavePageSitePerProcessBrowserTest() {}
« no previous file with comments | « no previous file | chrome/test/data/downloads/iframe-src-is-a-download.htm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698