diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 23:47:41 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 23:47:41 +0000 |
commit | 1741b97470b7d6af031ef9ebe37241faf2be3a91 (patch) | |
tree | 184f801016cbb28141e063fb0f7fb1a18d5c8195 | |
parent | ac73c27a9d630af27af9f920e41bdc4b8e8406ae (diff) | |
download | chromium_src-1741b97470b7d6af031ef9ebe37241faf2be3a91.zip chromium_src-1741b97470b7d6af031ef9ebe37241faf2be3a91.tar.gz chromium_src-1741b97470b7d6af031ef9ebe37241faf2be3a91.tar.bz2 |
Update the names of some parameters passed to contextMenu onclick handlers.
This changes the mediaType parameter values to be lowercase (eg "audio" instead
of "AUDIO"), and changes mainFrameUrl to be pageUrl as the design doc had
intended.
BUG=49725
TEST=In onclick handlers, values for mediaType should be lowercase and there
should be a pageUrl property matching the url of the page.
Review URL: http://codereview.chromium.org/3017056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54999 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/extensions/extension_menu_manager.cc | 8 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_menu_manager_unittest.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_menu_manager.cc b/chrome/browser/extensions/extension_menu_manager.cc index ff87f94..387e73e 100644 --- a/chrome/browser/extensions/extension_menu_manager.cc +++ b/chrome/browser/extensions/extension_menu_manager.cc @@ -393,20 +393,20 @@ void ExtensionMenuManager::ExecuteCommand( switch (params.media_type) { case WebKit::WebContextMenuData::MediaTypeImage: - properties->SetString(L"mediaType", "IMAGE"); + properties->SetString(L"mediaType", "image"); break; case WebKit::WebContextMenuData::MediaTypeVideo: - properties->SetString(L"mediaType", "VIDEO"); + properties->SetString(L"mediaType", "video"); break; case WebKit::WebContextMenuData::MediaTypeAudio: - properties->SetString(L"mediaType", "AUDIO"); + properties->SetString(L"mediaType", "audio"); break; default: {} // Do nothing. } AddURLProperty(properties, L"linkUrl", params.unfiltered_link_url); AddURLProperty(properties, L"srcUrl", params.src_url); - AddURLProperty(properties, L"mainFrameUrl", params.page_url); + AddURLProperty(properties, L"pageUrl", params.page_url); AddURLProperty(properties, L"frameUrl", params.frame_url); if (params.selection_text.length() > 0) diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc index 39ddcb7..4955930 100644 --- a/chrome/browser/extensions/extension_menu_manager_unittest.cc +++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc @@ -448,10 +448,10 @@ TEST_F(ExtensionMenuManagerTest, ExecuteCommand) { std::string tmp; ASSERT_TRUE(info->GetString(L"mediaType", &tmp)); - ASSERT_EQ("IMAGE", tmp); + ASSERT_EQ("image", tmp); ASSERT_TRUE(info->GetString(L"srcUrl", &tmp)); ASSERT_EQ(params.src_url.spec(), tmp); - ASSERT_TRUE(info->GetString(L"mainFrameUrl", &tmp)); + ASSERT_TRUE(info->GetString(L"pageUrl", &tmp)); ASSERT_EQ(params.page_url.spec(), tmp); std::wstring wide_tmp; |