diff options
author | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 21:16:25 +0000 |
---|---|---|
committer | asanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-07 21:16:25 +0000 |
commit | 0da3574c9c72088abfd57be3c5cdad5c57a2a435 (patch) | |
tree | 6ad780465e8d0035b30f225c0ce4e8ec2a12cbf9 /chrome/browser/download/download_path_reservation_tracker_unittest.cc | |
parent | 891bcd35637e5163f888e0a440c543b539ecc72a (diff) | |
download | chromium_src-0da3574c9c72088abfd57be3c5cdad5c57a2a435.zip chromium_src-0da3574c9c72088abfd57be3c5cdad5c57a2a435.tar.gz chromium_src-0da3574c9c72088abfd57be3c5cdad5c57a2a435.tar.bz2 |
Avoid LazyInstance in DownloadPathReservationTracker.
BUG=78085
Review URL: https://chromiumcodereview.appspot.com/10824132
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150410 0039d316-1c4b-4281-b951-d872f2087c98
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(); |