| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/file_system_provider/operations/open_file.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/open_file.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 class FileSystemProviderOperationsOpenFileTest : public testing::Test { | 69 class FileSystemProviderOperationsOpenFileTest : public testing::Test { |
| 70 protected: | 70 protected: |
| 71 FileSystemProviderOperationsOpenFileTest() {} | 71 FileSystemProviderOperationsOpenFileTest() {} |
| 72 virtual ~FileSystemProviderOperationsOpenFileTest() {} | 72 virtual ~FileSystemProviderOperationsOpenFileTest() {} |
| 73 | 73 |
| 74 virtual void SetUp() OVERRIDE { | 74 virtual void SetUp() OVERRIDE { |
| 75 file_system_info_ = | 75 file_system_info_ = |
| 76 ProvidedFileSystemInfo(kExtensionId, | 76 ProvidedFileSystemInfo(kExtensionId, |
| 77 kFileSystemId, | 77 kFileSystemId, |
| 78 "" /* file_system_name */, | 78 "" /* display_name */, |
| 79 base::FilePath() /* mount_path */); | 79 base::FilePath() /* mount_path */); |
| 80 } | 80 } |
| 81 | 81 |
| 82 ProvidedFileSystemInfo file_system_info_; | 82 ProvidedFileSystemInfo file_system_info_; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 TEST_F(FileSystemProviderOperationsOpenFileTest, Execute) { | 85 TEST_F(FileSystemProviderOperationsOpenFileTest, Execute) { |
| 86 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); | 86 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
| 87 CallbackLogger callback_logger; | 87 CallbackLogger callback_logger; |
| 88 | 88 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 base::File::FILE_ERROR_TOO_MANY_OPENED); | 200 base::File::FILE_ERROR_TOO_MANY_OPENED); |
| 201 ASSERT_EQ(1u, callback_logger.events().size()); | 201 ASSERT_EQ(1u, callback_logger.events().size()); |
| 202 CallbackLogger::Event* event = callback_logger.events()[0]; | 202 CallbackLogger::Event* event = callback_logger.events()[0]; |
| 203 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); | 203 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); |
| 204 ASSERT_EQ(0, event->file_handle()); | 204 ASSERT_EQ(0, event->file_handle()); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace operations | 207 } // namespace operations |
| 208 } // namespace file_system_provider | 208 } // namespace file_system_provider |
| 209 } // namespace chromeos | 209 } // namespace chromeos |
| OLD | NEW |