Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1751)

Unified Diff: chrome/browser/extensions/extension_menu_manager_unittest.cc

Issue 9316102: Update extension events, routing, and delivery to use user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lint fix Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_menu_manager_unittest.cc
diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc
index 210591c637704c0ffc72952399098cbda2914751..e15fc35002bc4d66f7989179dcede1baa881f5f0 100644
--- a/chrome/browser/extensions/extension_menu_manager_unittest.cc
+++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc
@@ -352,11 +352,13 @@ class MockExtensionEventRouter : public ExtensionEventRouter {
explicit MockExtensionEventRouter(Profile* profile) :
ExtensionEventRouter(profile) {}
- MOCK_METHOD5(DispatchEventToExtension, void(const std::string& extension_id,
- const std::string& event_name,
- const std::string& event_args,
- Profile* source_profile,
- const GURL& event_url));
+ MOCK_METHOD6(DispatchEventToExtension,
+ void(const std::string& extension_id,
+ const std::string& event_name,
+ const std::string& event_args,
+ Profile* source_profile,
+ const GURL& event_url,
+ ExtensionEventRouter::UserGestureState state));
private:
@@ -450,11 +452,13 @@ TEST_F(ExtensionMenuManagerTest, ExecuteCommand) {
std::string event_args;
std::string expected_event_name = "contextMenus";
EXPECT_CALL(*mock_event_router.get(),
- DispatchEventToExtension(item->extension_id(),
- expected_event_name,
- _,
- &profile,
- GURL()))
+ DispatchEventToExtension(
+ item->extension_id(),
+ expected_event_name,
+ _,
+ &profile,
+ GURL(),
+ ExtensionEventRouter::USER_GESTURE_ENABLED))
.Times(1)
.WillOnce(SaveArg<2>(&event_args));
@@ -584,4 +588,3 @@ TEST_F(ExtensionMenuManagerTest, SanitizeRadioButtons) {
ASSERT_FALSE(new_item->checked());
ASSERT_TRUE(child1->checked());
}
-
« no previous file with comments | « chrome/browser/extensions/extension_menu_manager.cc ('k') | chrome/browser/extensions/extension_message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698