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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc

Issue 12620027: Merge 188160 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
===================================================================
--- chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc (revision 188780)
+++ chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc (working copy)
@@ -103,15 +103,35 @@
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, web_contents(), profile(),
- CONTENT_SETTINGS_TYPE_COOKIES));
+ NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
- EXPECT_FALSE(bubble_content.title.empty());
- EXPECT_FALSE(bubble_content.radio_group.radio_items.empty());
+ std::string title = bubble_content.title;
+ EXPECT_FALSE(title.empty());
+ ASSERT_EQ(2U, bubble_content.radio_group.radio_items.size());
+ std::string radio1 = bubble_content.radio_group.radio_items[0];
+ std::string radio2 = bubble_content.radio_group.radio_items[1];
EXPECT_FALSE(bubble_content.custom_link.empty());
EXPECT_TRUE(bubble_content.custom_link_enabled);
EXPECT_FALSE(bubble_content.manage_link.empty());
+
+ content_settings->ClearCookieSpecificContentSettings();
+ content_settings->OnContentAccessed(CONTENT_SETTINGS_TYPE_COOKIES);
+ content_setting_bubble_model.reset(
+ ContentSettingBubbleModel::CreateContentSettingBubbleModel(
+ NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES));
+ const ContentSettingBubbleModel::BubbleContent& bubble_content_2 =
+ content_setting_bubble_model->bubble_content();
+
+ EXPECT_FALSE(bubble_content_2.title.empty());
+ EXPECT_NE(title, bubble_content_2.title);
+ ASSERT_EQ(2U, bubble_content_2.radio_group.radio_items.size());
+ // TODO(bauerb): Update this once the strings have been updated.
+ EXPECT_EQ(radio1, bubble_content_2.radio_group.radio_items[0]);
+ EXPECT_EQ(radio2, bubble_content_2.radio_group.radio_items[1]);
+ EXPECT_FALSE(bubble_content_2.custom_link.empty());
+ EXPECT_TRUE(bubble_content_2.custom_link_enabled);
+ EXPECT_FALSE(bubble_content_2.manage_link.empty());
}
TEST_F(ContentSettingBubbleModelTest, Mediastream) {
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698