| 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/create_file_operation.h" | 5 #include "chrome/browser/chromeos/drive/file_system/create_file_operation.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" | 7 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" |
| 8 #include "chrome/browser/google_apis/test_util.h" | 8 #include "chrome/browser/google_apis/test_util.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace drive { | 11 namespace drive { |
| 12 namespace file_system { | 12 namespace file_system { |
| 13 | 13 |
| 14 typedef OperationTestBase CreateFileOperationTest; | 14 typedef OperationTestBase CreateFileOperationTest; |
| 15 | 15 |
| 16 TEST_F(CreateFileOperationTest, CreateFile) { | 16 TEST_F(CreateFileOperationTest, CreateFile) { |
| 17 CreateFileOperation operation(blocking_task_runner(), | 17 CreateFileOperation operation(blocking_task_runner(), |
| 18 dummy_observer(), | 18 observer(), |
| 19 scheduler(), | 19 scheduler(), |
| 20 metadata(), | 20 metadata(), |
| 21 cache()); | 21 cache()); |
| 22 | 22 |
| 23 const base::FilePath kExistingFile( | 23 const base::FilePath kExistingFile( |
| 24 FILE_PATH_LITERAL("drive/root/File 1.txt")); | 24 FILE_PATH_LITERAL("drive/root/File 1.txt")); |
| 25 const base::FilePath kExistingDirectory( | 25 const base::FilePath kExistingDirectory( |
| 26 FILE_PATH_LITERAL("drive/root/Directory 1")); | 26 FILE_PATH_LITERAL("drive/root/Directory 1")); |
| 27 const base::FilePath kNonExistingFile( | 27 const base::FilePath kNonExistingFile( |
| 28 FILE_PATH_LITERAL("drive/root/Directory 1/not exist.png")); | 28 FILE_PATH_LITERAL("drive/root/Directory 1/not exist.png")); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 operation.CreateFile( | 66 operation.CreateFile( |
| 67 kFileInNonExistingDirectory, | 67 kFileInNonExistingDirectory, |
| 68 false, // is_exclusive | 68 false, // is_exclusive |
| 69 google_apis::test_util::CreateCopyResultCallback(&error)); | 69 google_apis::test_util::CreateCopyResultCallback(&error)); |
| 70 google_apis::test_util::RunBlockingPoolTask(); | 70 google_apis::test_util::RunBlockingPoolTask(); |
| 71 EXPECT_EQ(FILE_ERROR_NOT_A_DIRECTORY, error); | 71 EXPECT_EQ(FILE_ERROR_NOT_A_DIRECTORY, error); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace file_system | 74 } // namespace file_system |
| 75 } // namespace drive | 75 } // namespace drive |
| OLD | NEW |