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

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

Issue 1549573002: [download] DownloadTest.Resumption_Automatic should check final path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@path-reservation-tracker-owned-by-di
Patch Set: Created 5 years 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 9e1ffb61e8b5d4abad42adfe2c3c42ffd95bd5c8..408b5dd9965885ddb9238724a15e7d850f4466af 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -3119,6 +3119,16 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, Resumption_Automatic) {
// created should be that number + 1 (for the original download request). We
// only care that it is greater than 1.
EXPECT_GT(1u, error_injector->TotalFileCount());
+
+ scoped_ptr<content::DownloadTestObserver> completion_observer(
+ CreateWaiter(browser(), 1));
+ download->Resume();
+ completion_observer->WaitForFinished();
+
+ // Automatic resumption causes download target determination to be run
+ // multiple times. Make sure we end up with the correct filename at the end.
+ EXPECT_STREQ(kDownloadTest1Path,
+ download->GetTargetFilePath().BaseName().AsUTF8Unsafe().c_str());
}
// An interrupting download should be resumable multiple times.
« 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