Chromium Code Reviews| 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() {} |