| Index: chrome/browser/chromeos/file_system_provider/operations/get_actions_unittest.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/get_actions_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/get_actions_unittest.cc
|
| index 1ca010a3981547591be6e6cf2733bfef27dbd48d..af2f850e084e11fd81dd8528e33b0769d0d4bd0a 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/get_actions_unittest.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/get_actions_unittest.cc
|
| @@ -29,7 +29,9 @@ namespace {
|
| const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj";
|
| const char kFileSystemId[] = "testing-file-system";
|
| const int kRequestId = 2;
|
| -const base::FilePath::CharType kEntryPath[] = FILE_PATH_LITERAL("/directory");
|
| +const base::FilePath::CharType kDirectoryPath[] =
|
| + FILE_PATH_LITERAL("/directory");
|
| +const base::FilePath::CharType kFilePath[] = FILE_PATH_LITERAL("/file");
|
|
|
| // Callback invocation logger. Acts as a fileapi end-point.
|
| class CallbackLogger {
|
| @@ -97,9 +99,13 @@ class FileSystemProviderOperationsGetActionsTest : 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(FileSystemProviderOperationsGetActionsTest, Execute) {
|
| @@ -108,7 +114,7 @@ TEST_F(FileSystemProviderOperationsGetActionsTest, Execute) {
|
| util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
|
| CallbackLogger callback_logger;
|
|
|
| - GetActions get_actions(NULL, file_system_info_, base::FilePath(kEntryPath),
|
| + GetActions get_actions(NULL, file_system_info_, entry_paths_,
|
| base::Bind(&CallbackLogger::OnGetActions,
|
| base::Unretained(&callback_logger)));
|
| get_actions.SetDispatchEventImplForTesting(
|
| @@ -133,14 +139,16 @@ TEST_F(FileSystemProviderOperationsGetActionsTest, Execute) {
|
| GetActionsRequestedOptions::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])));
|
| }
|
|
|
| TEST_F(FileSystemProviderOperationsGetActionsTest, Execute_NoListener) {
|
| util::LoggingDispatchEventImpl dispatcher(false /* dispatch_reply */);
|
| CallbackLogger callback_logger;
|
|
|
| - GetActions get_actions(NULL, file_system_info_, base::FilePath(kEntryPath),
|
| + GetActions get_actions(NULL, file_system_info_, entry_paths_,
|
| base::Bind(&CallbackLogger::OnGetActions,
|
| base::Unretained(&callback_logger)));
|
| get_actions.SetDispatchEventImplForTesting(
|
| @@ -154,7 +162,7 @@ TEST_F(FileSystemProviderOperationsGetActionsTest, OnSuccess) {
|
| util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
|
| CallbackLogger callback_logger;
|
|
|
| - GetActions get_actions(NULL, file_system_info_, base::FilePath(kEntryPath),
|
| + GetActions get_actions(NULL, file_system_info_, entry_paths_,
|
| base::Bind(&CallbackLogger::OnGetActions,
|
| base::Unretained(&callback_logger)));
|
| get_actions.SetDispatchEventImplForTesting(
|
| @@ -213,7 +221,7 @@ TEST_F(FileSystemProviderOperationsGetActionsTest, OnError) {
|
| util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);
|
| CallbackLogger callback_logger;
|
|
|
| - GetActions get_actions(NULL, file_system_info_, base::FilePath(kEntryPath),
|
| + GetActions get_actions(NULL, file_system_info_, entry_paths_,
|
| base::Bind(&CallbackLogger::OnGetActions,
|
| base::Unretained(&callback_logger)));
|
| get_actions.SetDispatchEventImplForTesting(
|
|
|