| Index: components/drive/job_scheduler_unittest.cc
|
| diff --git a/components/drive/job_scheduler_unittest.cc b/components/drive/job_scheduler_unittest.cc
|
| index 005e0becd4d9751a356f769ac3e758562702ffb4..172d275b53ca51889779a21a730ec199671d1714 100644
|
| --- a/components/drive/job_scheduler_unittest.cc
|
| +++ b/components/drive/job_scheduler_unittest.cc
|
| @@ -587,7 +587,7 @@ TEST_F(JobSchedulerTest, DownloadFileCellularDisabled) {
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| const base::FilePath kOutputFilePath =
|
| - temp_dir.path().AppendASCII("whatever.txt");
|
| + temp_dir.GetPath().AppendASCII("whatever.txt");
|
| google_apis::DriveApiErrorCode download_error =
|
| google_apis::DRIVE_OTHER_ERROR;
|
| base::FilePath output_file_path;
|
| @@ -642,7 +642,7 @@ TEST_F(JobSchedulerTest, DownloadFileWimaxDisabled) {
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| const base::FilePath kOutputFilePath =
|
| - temp_dir.path().AppendASCII("whatever.txt");
|
| + temp_dir.GetPath().AppendASCII("whatever.txt");
|
| google_apis::DriveApiErrorCode download_error =
|
| google_apis::DRIVE_OTHER_ERROR;
|
| base::FilePath output_file_path;
|
| @@ -697,7 +697,7 @@ TEST_F(JobSchedulerTest, DownloadFileCellularEnabled) {
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| const base::FilePath kOutputFilePath =
|
| - temp_dir.path().AppendASCII("whatever.txt");
|
| + temp_dir.GetPath().AppendASCII("whatever.txt");
|
| google_apis::DriveApiErrorCode download_error =
|
| google_apis::DRIVE_OTHER_ERROR;
|
| base::FilePath output_file_path;
|
| @@ -744,7 +744,7 @@ TEST_F(JobSchedulerTest, DownloadFileWimaxEnabled) {
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| const base::FilePath kOutputFilePath =
|
| - temp_dir.path().AppendASCII("whatever.txt");
|
| + temp_dir.GetPath().AppendASCII("whatever.txt");
|
| google_apis::DriveApiErrorCode download_error =
|
| google_apis::DRIVE_OTHER_ERROR;
|
| base::FilePath output_file_path;
|
| @@ -817,10 +817,8 @@ TEST_F(JobSchedulerTest, JobInfo) {
|
| expected_types.insert(TYPE_DOWNLOAD_FILE);
|
| scheduler_->DownloadFile(
|
| base::FilePath::FromUTF8Unsafe("drive/whatever.txt"), // virtual path
|
| - kDummyDownloadFileSize,
|
| - temp_dir.path().AppendASCII("whatever.txt"),
|
| - "2_file_resource_id",
|
| - ClientContext(BACKGROUND),
|
| + kDummyDownloadFileSize, temp_dir.GetPath().AppendASCII("whatever.txt"),
|
| + "2_file_resource_id", ClientContext(BACKGROUND),
|
| google_apis::test_util::CreateCopyResultCallback(&error, &path),
|
| google_apis::GetContentCallback());
|
|
|
| @@ -914,10 +912,8 @@ TEST_F(JobSchedulerTest, JobInfoProgress) {
|
| // Download job.
|
| scheduler_->DownloadFile(
|
| base::FilePath::FromUTF8Unsafe("drive/whatever.txt"), // virtual path
|
| - kDummyDownloadFileSize,
|
| - temp_dir.path().AppendASCII("whatever.txt"),
|
| - "2_file_resource_id",
|
| - ClientContext(BACKGROUND),
|
| + kDummyDownloadFileSize, temp_dir.GetPath().AppendASCII("whatever.txt"),
|
| + "2_file_resource_id", ClientContext(BACKGROUND),
|
| google_apis::test_util::CreateCopyResultCallback(&error, &path),
|
| google_apis::GetContentCallback());
|
| base::RunLoop().RunUntilIdle();
|
| @@ -930,7 +926,7 @@ TEST_F(JobSchedulerTest, JobInfoProgress) {
|
| EXPECT_LE(download_progress.back(), 26);
|
|
|
| // Upload job.
|
| - path = temp_dir.path().AppendASCII("new_file.txt");
|
| + path = temp_dir.GetPath().AppendASCII("new_file.txt");
|
| ASSERT_TRUE(google_apis::test_util::WriteStringToFile(path, kHello));
|
| google_apis::DriveApiErrorCode upload_error =
|
| google_apis::DRIVE_OTHER_ERROR;
|
| @@ -954,7 +950,7 @@ TEST_F(JobSchedulerTest, JobInfoProgress) {
|
| TEST_F(JobSchedulerTest, CancelPendingJob) {
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| - base::FilePath upload_path = temp_dir.path().AppendASCII("new_file.txt");
|
| + base::FilePath upload_path = temp_dir.GetPath().AppendASCII("new_file.txt");
|
| ASSERT_TRUE(google_apis::test_util::WriteStringToFile(upload_path, kHello));
|
|
|
| // To create a pending job for testing, set the mode to cellular connection
|
| @@ -1002,7 +998,7 @@ TEST_F(JobSchedulerTest, CancelRunningJob) {
|
|
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| - base::FilePath upload_path = temp_dir.path().AppendASCII("new_file.txt");
|
| + base::FilePath upload_path = temp_dir.GetPath().AppendASCII("new_file.txt");
|
| ASSERT_TRUE(google_apis::test_util::WriteStringToFile(upload_path, kHello));
|
|
|
| // Run as a cancelable task.
|
|
|