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

Unified Diff: chrome/browser/content_setting_bubble_model_unittest.cc

Issue 5564007: Update Content Settings Bubbles (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: x Created 10 years 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
Index: chrome/browser/content_setting_bubble_model_unittest.cc
diff --git a/chrome/browser/content_setting_bubble_model_unittest.cc b/chrome/browser/content_setting_bubble_model_unittest.cc
index c08b2896b2bbfd4724dbb16fce1a99b8d1d38a1f..631c15e99baa36e1ebc72f7a0f7325ee9bfcb021 100644
--- a/chrome/browser/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/content_setting_bubble_model_unittest.cc
@@ -30,21 +30,16 @@ class ContentSettingBubbleModelTest : public RenderViewHostTestHarness {
contents(), profile_.get(), CONTENT_SETTINGS_TYPE_GEOLOCATION));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
+ EXPECT_EQ(std::string(), bubble_content.title);
Peter Kasting 2010/12/09 17:56:34 Nit: Use EXPECT_TRUE(bubble_content.title.empty())
EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size());
Peter Kasting 2010/12/09 17:56:34 Nit: These can both be changed to EXPECT_TRUE(xxx.
EXPECT_EQ(0U, bubble_content.popup_items.size());
- // The reload hint is currently implemented as a tacked on domain title, so
- // account for this.
- if (expect_reload_hint)
- ++expected_domains;
EXPECT_EQ(expected_domains, bubble_content.domain_lists.size());
- if (expect_clear_link)
- EXPECT_NE(std::string(), bubble_content.clear_link);
+ if (expect_clear_link || expect_reload_hint) {
Peter Kasting 2010/12/09 17:56:34 Nit: This conditional can just become: EXPECT_N
+ EXPECT_NE(std::string(), bubble_content.custom_link);
else
- EXPECT_EQ(std::string(), bubble_content.clear_link);
+ EXPECT_EQ(std::string(), bubble_content.custom_link);
+ EXPECT_EQ(expect_clear_link, bubble_content.custom_link_enabled);
EXPECT_NE(std::string(), bubble_content.manage_link);
- EXPECT_EQ(std::string(), bubble_content.info_link);
- EXPECT_EQ(std::string(), bubble_content.title);
- EXPECT_EQ(std::string(), bubble_content.load_plugins_link_title);
}
BrowserThread ui_thread_;
@@ -61,12 +56,12 @@ TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
contents(), profile_.get(), CONTENT_SETTINGS_TYPE_IMAGES));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
+ EXPECT_NE(std::string(), bubble_content.title);
EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
EXPECT_EQ(0, bubble_content.radio_group.default_item);
+ EXPECT_EQ(std::string(), bubble_content.custom_link);
+ EXPECT_FALSE(bubble_content.custom_link_enabled);
EXPECT_NE(std::string(), bubble_content.manage_link);
- EXPECT_EQ(std::string(), bubble_content.info_link);
- EXPECT_NE(std::string(), bubble_content.title);
- EXPECT_EQ(std::string(), bubble_content.load_plugins_link_title);
}
TEST_F(ContentSettingBubbleModelTest, Cookies) {
@@ -80,11 +75,11 @@ TEST_F(ContentSettingBubbleModelTest, Cookies) {
contents(), profile_.get(), CONTENT_SETTINGS_TYPE_COOKIES));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
+ EXPECT_NE(std::string(), bubble_content.title);
EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size());
+ EXPECT_NE(std::string(), bubble_content.custom_link);
+ EXPECT_TRUE(bubble_content.custom_link_enabled);
EXPECT_NE(std::string(), bubble_content.manage_link);
- EXPECT_NE(std::string(), bubble_content.info_link);
- EXPECT_NE(std::string(), bubble_content.title);
- EXPECT_EQ(std::string(), bubble_content.load_plugins_link_title);
}
TEST_F(ContentSettingBubbleModelTest, Plugins) {
@@ -98,11 +93,11 @@ TEST_F(ContentSettingBubbleModelTest, Plugins) {
contents(), profile_.get(), CONTENT_SETTINGS_TYPE_PLUGINS));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
+ EXPECT_NE(std::string(), bubble_content.title);
EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
+ EXPECT_EQ(std::string(), bubble_content.custom_link);
+ EXPECT_FALSE(bubble_content.custom_link_enabled);
EXPECT_NE(std::string(), bubble_content.manage_link);
- EXPECT_EQ(std::string(), bubble_content.info_link);
- EXPECT_NE(std::string(), bubble_content.title);
- EXPECT_NE(std::string(), bubble_content.load_plugins_link_title);
}
TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) {

Powered by Google App Engine
This is Rietveld 408576698