| Index: chrome/browser/chromeos/file_system_provider/operations/create_file_unittest.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/create_file_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/create_file_unittest.cc
|
| index 1dbce12445c432556e2944630a9adf849a067cf9..37f77cbd8c436c16fa54421e91df357289e8bc5a 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/create_file_unittest.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/create_file_unittest.cc
|
| @@ -101,6 +101,28 @@ TEST_F(FileSystemProviderOperationsCreateFileTest, Execute_NoListener) {
|
| EXPECT_FALSE(create_file.Execute(kRequestId));
|
| }
|
|
|
| +TEST_F(FileSystemProviderOperationsCreateFileTest, Execute_ReadOnly) {
|
| + util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
|
| + util::StatusCallbackLog callback_log;
|
| +
|
| + const ProvidedFileSystemInfo read_only_file_system_info(
|
| + kExtensionId,
|
| + kFileSystemId,
|
| + "" /* file_system_name */,
|
| + false /* writable */,
|
| + base::FilePath() /* mount_path */);
|
| +
|
| + CreateFile create_file(NULL,
|
| + read_only_file_system_info,
|
| + base::FilePath::FromUTF8Unsafe(kFilePath),
|
| + base::Bind(&util::LogStatusCallback, &callback_log));
|
| + create_file.SetDispatchEventImplForTesting(
|
| + base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
|
| + base::Unretained(&dispatcher)));
|
| +
|
| + EXPECT_FALSE(create_file.Execute(kRequestId));
|
| +}
|
| +
|
| TEST_F(FileSystemProviderOperationsCreateFileTest, OnSuccess) {
|
| util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
|
| util::StatusCallbackLog callback_log;
|
|
|