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

Side by Side Diff: chrome/browser/download/download_path_reservation_tracker_unittest.cc

Issue 2317993003: //chrome/browser and //components A-E: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const base::FilePath& path, bool verified); 76 const base::FilePath& path, bool verified);
77 }; 77 };
78 78
79 DownloadPathReservationTrackerTest::DownloadPathReservationTrackerTest() 79 DownloadPathReservationTrackerTest::DownloadPathReservationTrackerTest()
80 : ui_thread_(BrowserThread::UI, &message_loop_), 80 : ui_thread_(BrowserThread::UI, &message_loop_),
81 file_thread_(BrowserThread::FILE, &message_loop_) { 81 file_thread_(BrowserThread::FILE, &message_loop_) {
82 } 82 }
83 83
84 void DownloadPathReservationTrackerTest::SetUp() { 84 void DownloadPathReservationTrackerTest::SetUp() {
85 ASSERT_TRUE(test_download_dir_.CreateUniqueTempDir()); 85 ASSERT_TRUE(test_download_dir_.CreateUniqueTempDir());
86 set_default_download_path(test_download_dir_.path()); 86 set_default_download_path(test_download_dir_.GetPath());
87 } 87 }
88 88
89 void DownloadPathReservationTrackerTest::TearDown() { 89 void DownloadPathReservationTrackerTest::TearDown() {
90 base::RunLoop().RunUntilIdle(); 90 base::RunLoop().RunUntilIdle();
91 } 91 }
92 92
93 MockDownloadItem* DownloadPathReservationTrackerTest::CreateDownloadItem( 93 MockDownloadItem* DownloadPathReservationTrackerTest::CreateDownloadItem(
94 int32_t id) { 94 int32_t id) {
95 MockDownloadItem* item = new ::testing::StrictMock<MockDownloadItem>; 95 MockDownloadItem* item = new ::testing::StrictMock<MockDownloadItem>;
96 EXPECT_CALL(*item, GetId()) 96 EXPECT_CALL(*item, GetId())
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 create_directory, 709 create_directory,
710 conflict_action, 710 conflict_action,
711 &reserved_path, 711 &reserved_path,
712 &verified); 712 &verified);
713 // We cannot truncate a path with very long extension. 713 // We cannot truncate a path with very long extension.
714 EXPECT_FALSE(verified); 714 EXPECT_FALSE(verified);
715 SetDownloadItemState(item.get(), DownloadItem::COMPLETE); 715 SetDownloadItemState(item.get(), DownloadItem::COMPLETE);
716 } 716 }
717 717
718 #endif // Platforms that support filename truncation. 718 #endif // Platforms that support filename truncation.
OLDNEW
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/download/download_target_determiner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698