| 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_file.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/read_file.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 class FileSystemProviderOperationsReadFileTest : public testing::Test { | 74 class FileSystemProviderOperationsReadFileTest : public testing::Test { |
| 75 protected: | 75 protected: |
| 76 FileSystemProviderOperationsReadFileTest() {} | 76 FileSystemProviderOperationsReadFileTest() {} |
| 77 virtual ~FileSystemProviderOperationsReadFileTest() {} | 77 virtual ~FileSystemProviderOperationsReadFileTest() {} |
| 78 | 78 |
| 79 virtual void SetUp() OVERRIDE { | 79 virtual void SetUp() OVERRIDE { |
| 80 file_system_info_ = | 80 file_system_info_ = |
| 81 ProvidedFileSystemInfo(kExtensionId, | 81 ProvidedFileSystemInfo(kExtensionId, |
| 82 kFileSystemId, | 82 kFileSystemId, |
| 83 "" /* file_system_name */, | 83 "" /* display_name */, |
| 84 base::FilePath() /* mount_path */); | 84 base::FilePath() /* mount_path */); |
| 85 io_buffer_ = make_scoped_refptr(new net::IOBuffer(kOffset + kLength)); | 85 io_buffer_ = make_scoped_refptr(new net::IOBuffer(kOffset + kLength)); |
| 86 } | 86 } |
| 87 | 87 |
| 88 ProvidedFileSystemInfo file_system_info_; | 88 ProvidedFileSystemInfo file_system_info_; |
| 89 scoped_refptr<net::IOBuffer> io_buffer_; | 89 scoped_refptr<net::IOBuffer> io_buffer_; |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 TEST_F(FileSystemProviderOperationsReadFileTest, Execute) { | 92 TEST_F(FileSystemProviderOperationsReadFileTest, Execute) { |
| 93 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); | 93 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 base::File::FILE_ERROR_TOO_MANY_OPENED); | 230 base::File::FILE_ERROR_TOO_MANY_OPENED); |
| 231 | 231 |
| 232 ASSERT_EQ(1u, callback_logger.events().size()); | 232 ASSERT_EQ(1u, callback_logger.events().size()); |
| 233 CallbackLogger::Event* event = callback_logger.events()[0]; | 233 CallbackLogger::Event* event = callback_logger.events()[0]; |
| 234 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); | 234 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace operations | 237 } // namespace operations |
| 238 } // namespace file_system_provider | 238 } // namespace file_system_provider |
| 239 } // namespace chromeos | 239 } // namespace chromeos |
| OLD | NEW |