diff options
Diffstat (limited to 'chrome/browser/download/download_path_reservation_tracker_unittest.cc')
-rw-r--r-- | chrome/browser/download/download_path_reservation_tracker_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/download/download_path_reservation_tracker_unittest.cc b/chrome/browser/download/download_path_reservation_tracker_unittest.cc index aceaf3b..a4085fc 100644 --- a/chrome/browser/download/download_path_reservation_tracker_unittest.cc +++ b/chrome/browser/download/download_path_reservation_tracker_unittest.cc @@ -61,8 +61,6 @@ class FakeDownloadItem : public MockDownloadItem { ObserverList<Observer> observers_; }; -} // namespace - class DownloadPathReservationTrackerTest : public testing::Test { public: DownloadPathReservationTrackerTest(); @@ -129,7 +127,7 @@ FilePath DownloadPathReservationTrackerTest::GetPathInDownloadsDirectory( } bool DownloadPathReservationTrackerTest::IsPathInUse(const FilePath& path) { - return DownloadPathReservationTracker::GetInstance()->IsPathInUse(path); + return DownloadPathReservationTracker::IsPathInUseForTesting(path); } void DownloadPathReservationTrackerTest::CallGetReservedPath( @@ -160,6 +158,8 @@ void DownloadPathReservationTrackerTest::TestReservedPathCallback( *return_verified = verified; } +} // namespace + // A basic reservation is acquired and committed. TEST_F(DownloadPathReservationTrackerTest, BasicReservation) { scoped_ptr<FakeDownloadItem> item(CreateDownloadItem(1)); @@ -238,10 +238,10 @@ TEST_F(DownloadPathReservationTrackerTest, ConflictingFiles) { EXPECT_TRUE(IsPathInUse(path)); EXPECT_TRUE(IsPathInUse(reserved_path)); EXPECT_TRUE(verified); - // The path should be uniquified, skipping over foo.txt and + // The path should be uniquified, skipping over foo.txt but not over // "foo (1).txt.crdownload" EXPECT_EQ( - GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo (2).txt")).value(), + GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo (1).txt")).value(), reserved_path.value()); item.reset(); |