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

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

Issue 2786103005: Revert of Fix flaky DownloadTest.FeedbackServiceKeepDownload (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 60ad2acde66980c410077134236434f5fe259d13..d5f2deb66f6053911d914c0a59327505824788a1 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -3437,7 +3437,13 @@
ASSERT_TRUE(updated_downloads.empty());
}
-IN_PROC_BROWSER_TEST_F(DownloadTest, FeedbackServiceKeepDownload) {
+// Test is flaky Linux. crbug.com/705224
+#if defined(OS_LINUX)
+#define MAYBE_FeedbackServiceKeepDownload DISABLED_FeedbackServiceKeepDownload
+#else
+#define MAYBE_FeedbackServiceKeepDownload FeedbackServiceKeepDownload
+#endif
+IN_PROC_BROWSER_TEST_F(DownloadTest, MAYBE_FeedbackServiceKeepDownload) {
PrefService* prefs = browser()->profile()->GetPrefs();
prefs->SetBoolean(prefs::kSafeBrowsingEnabled, true);
safe_browsing::SetExtendedReportingPref(prefs, true);
@@ -3484,21 +3490,12 @@
// Begin feedback and check that file is still there.
download_protection_service->feedback_service()->BeginFeedbackForDownload(
downloads[0], DownloadCommands::KEEP);
- std::unique_ptr<DownloadTestObserverNotInProgress> completion_observer(
- new DownloadTestObserverNotInProgress(
- DownloadManagerForBrowser(browser()), 1));
-
- // Make sure download is finished before starting evaluation.
- if (!completion_observer->IsFinished()) {
- completion_observer->StartObserving();
- completion_observer->WaitForFinished();
- }
std::vector<DownloadItem*> updated_downloads;
GetDownloads(browser(), &updated_downloads);
ASSERT_EQ(std::size_t(1), updated_downloads.size());
ASSERT_FALSE(updated_downloads[0]->IsDangerous());
- ASSERT_TRUE(PathExists(updated_downloads[0]->GetTargetFilePath()));
+ ASSERT_TRUE(PathExists(updated_downloads[0]->GetFullPath()));
updated_downloads[0]->Cancel(true);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698