| Index: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
|
| diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
|
| index 22fb503479298b74d00af4fc64395aa23057621a..08f83af1827ab9548c87fc9f3e41717134eeb98a 100644
|
| --- a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
|
| +++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
|
| @@ -456,10 +456,54 @@ TEST_F(ContentSettingBubbleModelTest, Plugins) {
|
| const ContentSettingBubbleModel::BubbleContent& bubble_content =
|
| content_setting_bubble_model->bubble_content();
|
| EXPECT_FALSE(bubble_content.title.empty());
|
| - EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
|
| - EXPECT_FALSE(bubble_content.custom_link.empty());
|
| - EXPECT_TRUE(bubble_content.custom_link_enabled);
|
| + EXPECT_FALSE(bubble_content.learn_more_link.empty());
|
| + EXPECT_EQ(3U, bubble_content.radio_group.radio_items.size());
|
| + EXPECT_TRUE(bubble_content.custom_link.empty());
|
| EXPECT_FALSE(bubble_content.manage_link.empty());
|
| +
|
| + // Test to see that the default radio item is set to Block.
|
| + EXPECT_EQ(2, bubble_content.radio_group.default_item);
|
| +}
|
| +
|
| +TEST_F(ContentSettingBubbleModelTest, BlockedPluginsPermissionChange) {
|
| + TabSpecificContentSettings* content_settings =
|
| + TabSpecificContentSettings::FromWebContents(web_contents());
|
| + std::string file_url("file:///plugin/quicktime.html");
|
| + NavigateAndCommit(GURL(file_url));
|
| + content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS);
|
| + {
|
| + scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| + ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| + NULL, web_contents(), profile(),
|
| + CONTENT_SETTINGS_TYPE_PLUGINS));
|
| + }
|
| +
|
| + EXPECT_EQ(CONTENT_SETTING_BLOCK,
|
| + content_settings->plugin_bubble_setting());
|
| +
|
| + {
|
| + scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| + ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| + NULL, web_contents(), profile(),
|
| + CONTENT_SETTINGS_TYPE_PLUGINS));
|
| + // Change the radio setting.
|
| + content_setting_bubble_model->OnRadioClicked(0);
|
| + }
|
| +
|
| + EXPECT_EQ(CONTENT_SETTING_ALLOW,
|
| + content_settings->plugin_bubble_setting());
|
| +
|
| + {
|
| + scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| + ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| + NULL, web_contents(), profile(),
|
| + CONTENT_SETTINGS_TYPE_PLUGINS));
|
| + // Change the radio setting.
|
| + content_setting_bubble_model->OnRadioClicked(1);
|
| + }
|
| +
|
| + EXPECT_EQ(CONTENT_SETTING_DEFAULT,
|
| + content_settings->plugin_bubble_setting());
|
| }
|
|
|
| TEST_F(ContentSettingBubbleModelTest, PepperBroker) {
|
|
|