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 "chrome/browser/chromeos/drive/file_system/get_file_for_saving_operatio
n.h" | 5 #include "chrome/browser/chromeos/drive/file_system/get_file_for_saving_operatio
n.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/task_runner_util.h" | 11 #include "base/task_runner_util.h" |
12 #include "chrome/browser/chromeos/drive/drive.pb.h" | 12 #include "chrome/browser/chromeos/drive/drive.pb.h" |
13 #include "chrome/browser/chromeos/drive/file_errors.h" | 13 #include "chrome/browser/chromeos/drive/file_errors.h" |
14 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" | 14 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" |
15 #include "chrome/browser/chromeos/drive/file_write_watcher.h" | 15 #include "chrome/browser/chromeos/drive/file_write_watcher.h" |
16 #include "chrome/browser/google_apis/test_util.h" | 16 #include "google_apis/drive/test_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace drive { | 19 namespace drive { |
20 namespace file_system { | 20 namespace file_system { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // If OnCacheFileUploadNeededByOperation is called, records the local ID and | 24 // If OnCacheFileUploadNeededByOperation is called, records the local ID and |
25 // calls |quit_closure|. | 25 // calls |quit_closure|. |
26 class TestObserver : public OperationObserver { | 26 class TestObserver : public OperationObserver { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 google_apis::test_util::CreateCopyResultCallback( | 155 google_apis::test_util::CreateCopyResultCallback( |
156 &error, &local_path, &entry)); | 156 &error, &local_path, &entry)); |
157 test_util::RunBlockingPoolTask(); | 157 test_util::RunBlockingPoolTask(); |
158 | 158 |
159 // Checks that an error is returned. | 159 // Checks that an error is returned. |
160 EXPECT_EQ(FILE_ERROR_EXISTS, error); | 160 EXPECT_EQ(FILE_ERROR_EXISTS, error); |
161 } | 161 } |
162 | 162 |
163 } // namespace file_system | 163 } // namespace file_system |
164 } // namespace drive | 164 } // namespace drive |
OLD | NEW |