| 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/read_directory
.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/read_directory
.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace | 75 } // namespace |
| 76 | 76 |
| 77 class FileSystemProviderOperationsReadDirectoryTest : public testing::Test { | 77 class FileSystemProviderOperationsReadDirectoryTest : public testing::Test { |
| 78 protected: | 78 protected: |
| 79 FileSystemProviderOperationsReadDirectoryTest() {} | 79 FileSystemProviderOperationsReadDirectoryTest() {} |
| 80 virtual ~FileSystemProviderOperationsReadDirectoryTest() {} | 80 virtual ~FileSystemProviderOperationsReadDirectoryTest() {} |
| 81 | 81 |
| 82 virtual void SetUp() override { | 82 virtual void SetUp() override { |
| 83 file_system_info_ = | 83 file_system_info_ = ProvidedFileSystemInfo( |
| 84 ProvidedFileSystemInfo(kExtensionId, | 84 kExtensionId, |
| 85 kFileSystemId, | 85 MountOptions(kFileSystemId, "" /* display_name */), |
| 86 "" /* display_name */, | 86 base::FilePath()); |
| 87 false /* writable */, | |
| 88 false /* supports_notify_tag */, | |
| 89 base::FilePath() /* mount_path */); | |
| 90 } | 87 } |
| 91 | 88 |
| 92 ProvidedFileSystemInfo file_system_info_; | 89 ProvidedFileSystemInfo file_system_info_; |
| 93 }; | 90 }; |
| 94 | 91 |
| 95 TEST_F(FileSystemProviderOperationsReadDirectoryTest, Execute) { | 92 TEST_F(FileSystemProviderOperationsReadDirectoryTest, Execute) { |
| 96 using extensions::api::file_system_provider::ReadDirectoryRequestedOptions; | 93 using extensions::api::file_system_provider::ReadDirectoryRequestedOptions; |
| 97 | 94 |
| 98 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); | 95 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
| 99 CallbackLogger callback_logger; | 96 CallbackLogger callback_logger; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 233 |
| 237 ASSERT_EQ(1u, callback_logger.events().size()); | 234 ASSERT_EQ(1u, callback_logger.events().size()); |
| 238 CallbackLogger::Event* event = callback_logger.events()[0]; | 235 CallbackLogger::Event* event = callback_logger.events()[0]; |
| 239 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); | 236 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); |
| 240 ASSERT_EQ(0u, event->entry_list().size()); | 237 ASSERT_EQ(0u, event->entry_list().size()); |
| 241 } | 238 } |
| 242 | 239 |
| 243 } // namespace operations | 240 } // namespace operations |
| 244 } // namespace file_system_provider | 241 } // namespace file_system_provider |
| 245 } // namespace chromeos | 242 } // namespace chromeos |
| OLD | NEW |