diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 00:41:13 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 00:41:13 +0000 |
commit | 0a184b5d3f485ffeb672754b0855a7fe80d87db6 (patch) | |
tree | 0140d5ce56f38eaeb661cb9b0dfa9ce07ebe0bf6 /chrome/browser/extensions/extension_menu_manager_unittest.cc | |
parent | ca87a0334160f3fa810c76a26b7c0191377e50b2 (diff) | |
download | chromium_src-0a184b5d3f485ffeb672754b0855a7fe80d87db6.zip chromium_src-0a184b5d3f485ffeb672754b0855a7fe80d87db6.tar.gz chromium_src-0a184b5d3f485ffeb672754b0855a7fe80d87db6.tar.bz2 |
More correct window focus changes for multi-profile and incognito.
Multi-profile: treat windows from other profiles as WINDOW_ID_NONE.
Incognito: on switching between default/OTR profile windows, send WINDOW_ID_NONE to the extensions that can't see the new window.
Also make ExtensionBrowserEventRouter listen only to events from browsers and tabs for its profile, except for window focus events.
BUG=46610, 57186, 86001
TEST=Manually tested extensions in spanning and split mode.
Review URL: http://codereview.chromium.org/7187015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_menu_manager_unittest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_menu_manager_unittest.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc index cfe2009..fff6f91 100644 --- a/chrome/browser/extensions/extension_menu_manager_unittest.cc +++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc @@ -345,10 +345,11 @@ class MockExtensionEventRouter : public ExtensionEventRouter { explicit MockExtensionEventRouter(Profile* profile) : ExtensionEventRouter(profile) {} - MOCK_METHOD5(DispatchEventImpl, void(const std::string& extension_id, + MOCK_METHOD6(DispatchEventImpl, void(const std::string& extension_id, const std::string& event_name, const std::string& event_args, Profile* source_profile, + const std::string& cross_incognito_args, const GURL& event_url)); private: @@ -438,7 +439,7 @@ TEST_F(ExtensionMenuManagerTest, ExecuteCommand) { .WillOnce(Return(mock_event_router.get())); // Use the magic of googlemock to save a parameter to our mock's - // DispatchEventImpl method into event_args. + // DispatchEventToExtension method into event_args. std::string event_args; std::string expected_event_name = "contextMenus"; EXPECT_CALL(*mock_event_router.get(), @@ -446,6 +447,7 @@ TEST_F(ExtensionMenuManagerTest, ExecuteCommand) { expected_event_name, _, &profile, + "", GURL())) .Times(1) .WillOnce(SaveArg<2>(&event_args)); |