OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/drive/chromeos/file_system/get_file_for_saving_operation.h" | 5 #include "components/drive/chromeos/file_system/get_file_for_saving_operation.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 class GetFileForSavingOperationTest : public OperationTestBase { | 57 class GetFileForSavingOperationTest : public OperationTestBase { |
58 protected: | 58 protected: |
59 // FileWriteWatcher requires TYPE_IO message loop to run. | 59 // FileWriteWatcher requires TYPE_IO message loop to run. |
60 GetFileForSavingOperationTest() | 60 GetFileForSavingOperationTest() |
61 : OperationTestBase(content::TestBrowserThreadBundle::IO_MAINLOOP) { | 61 : OperationTestBase(content::TestBrowserThreadBundle::IO_MAINLOOP) { |
62 } | 62 } |
63 | 63 |
64 void SetUp() override { | 64 void SetUp() override { |
65 OperationTestBase::SetUp(); | 65 OperationTestBase::SetUp(); |
66 | 66 |
67 file_task_runner_ = content::BrowserThread::GetMessageLoopProxyForThread( | 67 file_task_runner_ = content::BrowserThread::GetTaskRunnerForThread( |
68 content::BrowserThread::FILE); | 68 content::BrowserThread::FILE); |
69 | 69 |
70 operation_.reset(new GetFileForSavingOperation( | 70 operation_.reset(new GetFileForSavingOperation( |
71 logger(), blocking_task_runner(), file_task_runner_.get(), &delegate_, | 71 logger(), blocking_task_runner(), file_task_runner_.get(), &delegate_, |
72 scheduler(), metadata(), cache(), temp_dir())); | 72 scheduler(), metadata(), cache(), temp_dir())); |
73 operation_->file_write_watcher_for_testing()->DisableDelayForTesting(); | 73 operation_->file_write_watcher_for_testing()->DisableDelayForTesting(); |
74 } | 74 } |
75 | 75 |
76 TestDelegate delegate_; | 76 TestDelegate delegate_; |
77 std::unique_ptr<GetFileForSavingOperation> operation_; | 77 std::unique_ptr<GetFileForSavingOperation> operation_; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 google_apis::test_util::CreateCopyResultCallback( | 151 google_apis::test_util::CreateCopyResultCallback( |
152 &error, &local_path, &entry)); | 152 &error, &local_path, &entry)); |
153 content::RunAllBlockingPoolTasksUntilIdle(); | 153 content::RunAllBlockingPoolTasksUntilIdle(); |
154 | 154 |
155 // Checks that an error is returned. | 155 // Checks that an error is returned. |
156 EXPECT_EQ(FILE_ERROR_EXISTS, error); | 156 EXPECT_EQ(FILE_ERROR_EXISTS, error); |
157 } | 157 } |
158 | 158 |
159 } // namespace file_system | 159 } // namespace file_system |
160 } // namespace drive | 160 } // namespace drive |
OLD | NEW |