| Index: chrome/browser/chromeos/file_system_provider/operations/truncate_unittest.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/truncate_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/truncate_unittest.cc
|
| index 66e2adcbede4aaa307cd7550bdedaaf83f223650..1ba6a14c29f743934b8957fc66f7c6411113fcf4 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/truncate_unittest.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/truncate_unittest.cc
|
| @@ -108,6 +108,29 @@ TEST_F(FileSystemProviderOperationsTruncateTest, Execute_NoListener) {
|
| EXPECT_FALSE(truncate.Execute(kRequestId));
|
| }
|
|
|
| +TEST_F(FileSystemProviderOperationsTruncateTest, Execute_ReadOnly) {
|
| + util::LoggingDispatchEventImpl dispatcher(false /* dispatch_reply */);
|
| + util::StatusCallbackLog callback_log;
|
| +
|
| + const ProvidedFileSystemInfo read_only_file_system_info(
|
| + kExtensionId,
|
| + kFileSystemId,
|
| + "" /* file_system_name */,
|
| + false /* writable */,
|
| + base::FilePath() /* mount_path */);
|
| +
|
| + Truncate truncate(NULL,
|
| + file_system_info_,
|
| + base::FilePath::FromUTF8Unsafe(kFilePath),
|
| + kTruncateLength,
|
| + base::Bind(&util::LogStatusCallback, &callback_log));
|
| + truncate.SetDispatchEventImplForTesting(
|
| + base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
|
| + base::Unretained(&dispatcher)));
|
| +
|
| + EXPECT_FALSE(truncate.Execute(kRequestId));
|
| +}
|
| +
|
| TEST_F(FileSystemProviderOperationsTruncateTest, OnSuccess) {
|
| util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
|
| util::StatusCallbackLog callback_log;
|
|
|