Index: chrome/browser/download/download_path_reservation_tracker_unittest.cc |
diff --git a/chrome/browser/download/download_path_reservation_tracker_unittest.cc b/chrome/browser/download/download_path_reservation_tracker_unittest.cc |
index aceaf3b2621f425047e397d65bc582605591f1ec..a4085fc597049cce03a6527d2eb1785eb3d11019 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(); |