Index: chrome/browser/chromeos/file_system_provider/operations/create_directory_unittest.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/create_directory_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/create_directory_unittest.cc |
index a9c5c0e2ab75ed2740577db86607d5b7509b18bd..0fc8ce79e667c12068f17cf380a5988992a7e891 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/create_directory_unittest.cc |
+++ b/chrome/browser/chromeos/file_system_provider/operations/create_directory_unittest.cc |
@@ -49,6 +49,8 @@ class FileSystemProviderOperationsCreateDirectoryTest : public testing::Test { |
}; |
TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute) { |
+ using extensions::api::file_system_provider::CreateDirectoryRequestedOptions; |
+ |
util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
util::StatusCallbackLog callback_log; |
@@ -72,24 +74,16 @@ TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute) { |
base::ListValue* event_args = event->event_args.get(); |
ASSERT_EQ(1u, event_args->GetSize()); |
- base::DictionaryValue* options = NULL; |
- ASSERT_TRUE(event_args->GetDictionary(0, &options)); |
- |
- std::string event_file_system_id; |
- EXPECT_TRUE(options->GetString("fileSystemId", &event_file_system_id)); |
- EXPECT_EQ(kFileSystemId, event_file_system_id); |
- |
- int event_request_id = -1; |
- EXPECT_TRUE(options->GetInteger("requestId", &event_request_id)); |
- EXPECT_EQ(kRequestId, event_request_id); |
- |
- std::string event_directory_path; |
- EXPECT_TRUE(options->GetString("directoryPath", &event_directory_path)); |
- EXPECT_EQ(kDirectoryPath, event_directory_path); |
+ const base::DictionaryValue* options_as_value = NULL; |
+ ASSERT_TRUE(event_args->GetDictionary(0, &options_as_value)); |
- bool event_recursive; |
- EXPECT_TRUE(options->GetBoolean("recursive", &event_recursive)); |
- EXPECT_TRUE(event_recursive); |
+ CreateDirectoryRequestedOptions options; |
+ ASSERT_TRUE( |
+ CreateDirectoryRequestedOptions::Populate(*options_as_value, &options)); |
+ EXPECT_EQ(kFileSystemId, options.file_system_id); |
+ EXPECT_EQ(kRequestId, options.request_id); |
+ EXPECT_EQ(kDirectoryPath, options.directory_path); |
+ EXPECT_TRUE(options.recursive); |
} |
TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute_NoListener) { |