| Index: chrome/browser/chromeos/file_system_provider/operations/execute_action_unittest.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/execute_action_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/execute_action_unittest.cc
|
| index f89c4d274f4d1cefbcf7b202171cdb9c75621749..de14bd4445a140fd3b3781721d9ac2eab32d58d1 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/execute_action_unittest.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/execute_action_unittest.cc
|
| @@ -28,8 +28,10 @@ namespace {
|
| const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj";
|
| const char kFileSystemId[] = "testing-file-system";
|
| const int kRequestId = 2;
|
| -const base::FilePath::CharType kEntryPath[] =
|
| +const base::FilePath::CharType kDirectoryPath[] =
|
| FILE_PATH_LITERAL("/kitty/and/puppy/happy");
|
| +const base::FilePath::CharType kFilePath[] =
|
| + FILE_PATH_LITERAL("/rabbit/and/bear/happy");
|
| const char kActionId[] = "SHARE";
|
|
|
| } // namespace
|
| @@ -44,9 +46,13 @@ class FileSystemProviderOperationsExecuteActionTest : public testing::Test {
|
| kExtensionId, MountOptions(kFileSystemId, "" /* display_name */),
|
| base::FilePath(), false /* configurable */, true /* watchable */,
|
| extensions::SOURCE_FILE);
|
| + entry_paths_.clear();
|
| + entry_paths_.insert(base::FilePath(kDirectoryPath));
|
| + entry_paths_.insert(base::FilePath(kFilePath));
|
| }
|
|
|
| ProvidedFileSystemInfo file_system_info_;
|
| + std::set<base::FilePath> entry_paths_;
|
| };
|
|
|
| TEST_F(FileSystemProviderOperationsExecuteActionTest, Execute) {
|
| @@ -56,7 +62,7 @@ TEST_F(FileSystemProviderOperationsExecuteActionTest, Execute) {
|
| util::StatusCallbackLog callback_log;
|
|
|
| ExecuteAction execute_action(
|
| - NULL, file_system_info_, base::FilePath(kEntryPath), kActionId,
|
| + NULL, file_system_info_, entry_paths_, kActionId,
|
| base::Bind(&util::LogStatusCallback, &callback_log));
|
| execute_action.SetDispatchEventImplForTesting(
|
| base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
|
| @@ -80,7 +86,9 @@ TEST_F(FileSystemProviderOperationsExecuteActionTest, Execute) {
|
| ExecuteActionRequestedOptions::Populate(*options_as_value, &options));
|
| EXPECT_EQ(kFileSystemId, options.file_system_id);
|
| EXPECT_EQ(kRequestId, options.request_id);
|
| - EXPECT_EQ(kEntryPath, options.entry_path);
|
| + ASSERT_EQ(entry_paths_.size(), options.entry_paths.size());
|
| + EXPECT_EQ(1u, entry_paths_.count(base::FilePath(options.entry_paths[0])));
|
| + EXPECT_EQ(1u, entry_paths_.count(base::FilePath(options.entry_paths[1])));
|
| EXPECT_EQ(kActionId, options.action_id);
|
| }
|
|
|
| @@ -89,7 +97,7 @@ TEST_F(FileSystemProviderOperationsExecuteActionTest, Execute_NoListener) {
|
| util::StatusCallbackLog callback_log;
|
|
|
| ExecuteAction execute_action(
|
| - NULL, file_system_info_, base::FilePath(kEntryPath), kActionId,
|
| + NULL, file_system_info_, entry_paths_, kActionId,
|
| base::Bind(&util::LogStatusCallback, &callback_log));
|
| execute_action.SetDispatchEventImplForTesting(
|
| base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
|
| @@ -103,7 +111,7 @@ TEST_F(FileSystemProviderOperationsExecuteActionTest, OnSuccess) {
|
| util::StatusCallbackLog callback_log;
|
|
|
| ExecuteAction execute_action(
|
| - NULL, file_system_info_, base::FilePath(kEntryPath), kActionId,
|
| + NULL, file_system_info_, entry_paths_, kActionId,
|
| base::Bind(&util::LogStatusCallback, &callback_log));
|
| execute_action.SetDispatchEventImplForTesting(
|
| base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
|
| @@ -123,7 +131,7 @@ TEST_F(FileSystemProviderOperationsExecuteActionTest, OnError) {
|
| util::StatusCallbackLog callback_log;
|
|
|
| ExecuteAction execute_action(
|
| - NULL, file_system_info_, base::FilePath(kEntryPath), kActionId,
|
| + NULL, file_system_info_, entry_paths_, kActionId,
|
| base::Bind(&util::LogStatusCallback, &callback_log));
|
| execute_action.SetDispatchEventImplForTesting(
|
| base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,
|
|
|