Index: chrome/browser/chromeos/file_system_provider/operations/abort_unittest.cc |
diff --git a/chrome/browser/chromeos/file_system_provider/operations/abort_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/abort_unittest.cc |
index 123a8307187693b7a38de9a44f0573521e600a09..6518c9bc52e86d8fd48a73290a976a9faebcd6fb 100644 |
--- a/chrome/browser/chromeos/file_system_provider/operations/abort_unittest.cc |
+++ b/chrome/browser/chromeos/file_system_provider/operations/abort_unittest.cc |
@@ -49,6 +49,8 @@ class FileSystemProviderOperationsAbortTest : public testing::Test { |
}; |
TEST_F(FileSystemProviderOperationsAbortTest, Execute) { |
+ using extensions::api::file_system_provider::AbortRequestedOptions; |
+ |
util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */); |
util::StatusCallbackLog callback_log; |
@@ -69,21 +71,14 @@ TEST_F(FileSystemProviderOperationsAbortTest, 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); |
+ const base::DictionaryValue* options_as_value = NULL; |
+ ASSERT_TRUE(event_args->GetDictionary(0, &options_as_value)); |
- int event_operation_request_id; |
- EXPECT_TRUE( |
- options->GetInteger("operationRequestId", &event_operation_request_id)); |
- EXPECT_EQ(kOperationRequestId, event_operation_request_id); |
+ AbortRequestedOptions options; |
+ ASSERT_TRUE(AbortRequestedOptions::Populate(*options_as_value, &options)); |
+ EXPECT_EQ(kFileSystemId, options.file_system_id); |
+ EXPECT_EQ(kRequestId, options.request_id); |
+ EXPECT_EQ(kOperationRequestId, options.operation_request_id); |
} |
TEST_F(FileSystemProviderOperationsAbortTest, Execute_NoListener) { |