Index: chrome/browser/chromeos/file_system_provider/operations/move_entry_unittest.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/move_entry_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/move_entry_unittest.cc |
index d8e1a211637c91c6957ee335e4797f1404c37c91..857cbf4fbb35fc91b083b32e7c81448c16290566 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/move_entry_unittest.cc |
+++ b/chrome/browser/chromeos/file_system_provider/operations/move_entry_unittest.cc |
@@ -108,6 +108,29 @@ TEST_F(FileSystemProviderOperationsMoveEntryTest, Execute_NoListener) { |
EXPECT_FALSE(move_entry.Execute(kRequestId)); |
} |
+TEST_F(FileSystemProviderOperationsMoveEntryTest, 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 */); |
+ |
+ MoveEntry move_entry(NULL, |
+ read_only_file_system_info, |
+ base::FilePath::FromUTF8Unsafe(kSourcePath), |
+ base::FilePath::FromUTF8Unsafe(kTargetPath), |
+ base::Bind(&util::LogStatusCallback, &callback_log)); |
+ move_entry.SetDispatchEventImplForTesting( |
+ base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl, |
+ base::Unretained(&dispatcher))); |
+ |
+ EXPECT_FALSE(move_entry.Execute(kRequestId)); |
+} |
+ |
TEST_F(FileSystemProviderOperationsMoveEntryTest, OnSuccess) { |
util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
util::StatusCallbackLog callback_log; |