diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 14:53:28 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-19 14:53:28 +0000 |
commit | 55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28 (patch) | |
tree | 9c283aee59bc21de2843c49eb0bbf03a428cfcfc /chrome/browser/content_setting_bubble_model_unittest.cc | |
parent | 904f191f2f7edc9b331e2590c77eb4e8dd845549 (diff) | |
download | chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.zip chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.tar.gz chromium_src-55126134af52fe0f6a426f0f7ccfeeb8cf2c9f28.tar.bz2 |
Reland 55888: Allow per-plugin content settings.
Now with Fixed Unit Tests!
Run with --enable-resource-content-settings and --enable-click-to-play to enable.
TabSpecificContentSettings now keeps track of which resources were blocked. The content setting bubble displays those resource, and selecting the "allow radio buttons adds exceptions for these resources.
The infobar for non-sandboxed plug-ins now also shows a button to always allow the blocked plug-in on that site.
Screenshot of the plugin bubble: http://imgur.com/6npqv.png
Because we need to change the title and radio button labels depending on whether we track specific plug-ins, we copy them from the ContentSettingBubbleModel.
XIB changes: Add a text field for the blocked plug-ins to ContentBlockedPlugins.xib, hooked up to the |blockedResourcesField_| outlet.
BUG=39252,38432
TEST=HostContentSettingsMapTest.*,manual
Review URL: http://codereview.chromium.org/2873104
Review URL: http://codereview.chromium.org/3124018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_setting_bubble_model_unittest.cc')
-rw-r--r-- | chrome/browser/content_setting_bubble_model_unittest.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/content_setting_bubble_model_unittest.cc b/chrome/browser/content_setting_bubble_model_unittest.cc index f1d908d..d7c55ee 100644 --- a/chrome/browser/content_setting_bubble_model_unittest.cc +++ b/chrome/browser/content_setting_bubble_model_unittest.cc @@ -49,7 +49,8 @@ class ContentSettingBubbleModelTest : public RenderViewHostTestHarness { TEST_F(ContentSettingBubbleModelTest, ImageRadios) { TabSpecificContentSettings* content_settings = contents()->GetTabSpecificContentSettings(); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES, + std::string()); scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( ContentSettingBubbleModel::CreateContentSettingBubbleModel( @@ -67,7 +68,8 @@ TEST_F(ContentSettingBubbleModelTest, ImageRadios) { TEST_F(ContentSettingBubbleModelTest, Cookies) { TabSpecificContentSettings* content_settings = contents()->GetTabSpecificContentSettings(); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES, + std::string()); scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( ContentSettingBubbleModel::CreateContentSettingBubbleModel( @@ -84,7 +86,8 @@ TEST_F(ContentSettingBubbleModelTest, Cookies) { TEST_F(ContentSettingBubbleModelTest, Plugins) { TabSpecificContentSettings* content_settings = contents()->GetTabSpecificContentSettings(); - content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS); + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS, + std::string()); scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( ContentSettingBubbleModel::CreateContentSettingBubbleModel( |