| Index: chrome/browser/extensions/menu_manager_unittest.cc
|
| diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc
|
| index fb238e862ff6afb0568a58e7fc96bbc5665d7ed6..2a72944d2eb949c18f852e08f88d4332410054d5 100644
|
| --- a/chrome/browser/extensions/menu_manager_unittest.cc
|
| +++ b/chrome/browser/extensions/menu_manager_unittest.cc
|
| @@ -378,7 +378,7 @@ class MockExtensionEventRouter : public ExtensionEventRouter {
|
| MOCK_METHOD6(DispatchEventToExtension,
|
| void(const std::string& extension_id,
|
| const std::string& event_name,
|
| - const std::string& event_args,
|
| + base::ListValue* event_args,
|
| Profile* source_profile,
|
| const GURL& event_url,
|
| ExtensionEventRouter::UserGestureState state));
|
| @@ -474,7 +474,7 @@ TEST_F(MenuManagerTest, ExecuteCommand) {
|
|
|
| // Use the magic of googlemock to save a parameter to our mock's
|
| // DispatchEventToExtension method into event_args.
|
| - std::string event_args;
|
| + base::ListValue* list = NULL;
|
| {
|
| InSequence s;
|
| EXPECT_CALL(*mock_event_router.get(),
|
| @@ -486,7 +486,7 @@ TEST_F(MenuManagerTest, ExecuteCommand) {
|
| GURL(),
|
| ExtensionEventRouter::USER_GESTURE_ENABLED))
|
| .Times(1)
|
| - .WillOnce(SaveArg<2>(&event_args));
|
| + .WillOnce(SaveArg<2>(&list));
|
| EXPECT_CALL(*mock_event_router.get(),
|
| DispatchEventToExtension(
|
| item->extension_id(),
|
| @@ -499,15 +499,6 @@ TEST_F(MenuManagerTest, ExecuteCommand) {
|
| }
|
| manager_.ExecuteCommand(&profile, NULL /* tab_contents */, params, id);
|
|
|
| - // Parse the json event_args, which should turn into a 2-element list where
|
| - // the first element is a dictionary we want to inspect for the correct
|
| - // values.
|
| - scoped_ptr<Value> result(
|
| - base::JSONReader::Read(event_args, base::JSON_ALLOW_TRAILING_COMMAS));
|
| - Value* value = result.get();
|
| - ASSERT_TRUE(result.get() != NULL);
|
| - ASSERT_EQ(Value::TYPE_LIST, value->GetType());
|
| - ListValue* list = static_cast<ListValue*>(value);
|
| ASSERT_EQ(2u, list->GetSize());
|
|
|
| DictionaryValue* info;
|
|
|