Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: chrome/browser/chromeos/file_system_provider/operations/open_file_unittest.cc

Issue 372163006: [fsp] Add an option for mounting in R/W mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed tests. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 "" /* display_name */, 78 "" /* display_name */,
79 false /* writable */,
79 base::FilePath() /* mount_path */); 80 base::FilePath() /* mount_path */);
80 } 81 }
81 82
82 ProvidedFileSystemInfo file_system_info_; 83 ProvidedFileSystemInfo file_system_info_;
83 }; 84 };
84 85
85 TEST_F(FileSystemProviderOperationsOpenFileTest, Execute) { 86 TEST_F(FileSystemProviderOperationsOpenFileTest, Execute) {
86 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); 87 util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
87 CallbackLogger callback_logger; 88 CallbackLogger callback_logger;
88 89
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 base::File::FILE_ERROR_TOO_MANY_OPENED); 193 base::File::FILE_ERROR_TOO_MANY_OPENED);
193 ASSERT_EQ(1u, callback_logger.events().size()); 194 ASSERT_EQ(1u, callback_logger.events().size());
194 CallbackLogger::Event* event = callback_logger.events()[0]; 195 CallbackLogger::Event* event = callback_logger.events()[0];
195 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result()); 196 EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, event->result());
196 ASSERT_EQ(0, event->file_handle()); 197 ASSERT_EQ(0, event->file_handle());
197 } 198 }
198 199
199 } // namespace operations 200 } // namespace operations
200 } // namespace file_system_provider 201 } // namespace file_system_provider
201 } // namespace chromeos 202 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698