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

Side by Side Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc

Issue 2565403003: [HBD] Remove radio buttons from the Plugins Blocked Omnibox popup. (Closed)
Patch Set: Created 4 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/scoped_feature_list.h" 10 #include "base/test/scoped_feature_list.h"
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 722
723 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model( 723 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
724 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 724 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
725 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_PLUGINS)); 725 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_PLUGINS));
726 const ContentSettingBubbleModel::BubbleContent& bubble_content = 726 const ContentSettingBubbleModel::BubbleContent& bubble_content =
727 content_setting_bubble_model->bubble_content(); 727 content_setting_bubble_model->bubble_content();
728 EXPECT_FALSE(bubble_content.title.empty()); 728 EXPECT_FALSE(bubble_content.title.empty());
729 ASSERT_EQ(1U, bubble_content.list_items.size()); 729 ASSERT_EQ(1U, bubble_content.list_items.size());
730 EXPECT_EQ(plugin_name, 730 EXPECT_EQ(plugin_name,
731 base::ASCIIToUTF16(bubble_content.list_items[0].title)); 731 base::ASCIIToUTF16(bubble_content.list_items[0].title));
732 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 732 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size());
733 EXPECT_FALSE(bubble_content.custom_link.empty()); 733 EXPECT_FALSE(bubble_content.custom_link.empty());
734 EXPECT_TRUE(bubble_content.custom_link_enabled); 734 EXPECT_TRUE(bubble_content.custom_link_enabled);
735 EXPECT_FALSE(bubble_content.manage_text.empty()); 735 EXPECT_FALSE(bubble_content.manage_text.empty());
736 EXPECT_FALSE(bubble_content.learn_more_link.empty()); 736 EXPECT_FALSE(bubble_content.learn_more_link.empty());
737 } 737 }
738 738
739 TEST_F(ContentSettingBubbleModelTest, PepperBroker) { 739 TEST_F(ContentSettingBubbleModelTest, PepperBroker) {
740 TabSpecificContentSettings* content_settings = 740 TabSpecificContentSettings* content_settings =
741 TabSpecificContentSettings::FromWebContents(web_contents()); 741 TabSpecificContentSettings::FromWebContents(web_contents());
742 content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER); 742 content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PPAPI_BROKER);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); 946 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION));
947 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size()); 947 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size());
948 EXPECT_EQ(0, bubble_content.radio_group.default_item); 948 EXPECT_EQ(0, bubble_content.radio_group.default_item);
949 EXPECT_TRUE(bubble_content.custom_link.empty()); 949 EXPECT_TRUE(bubble_content.custom_link.empty());
950 EXPECT_FALSE(bubble_content.custom_link_enabled); 950 EXPECT_FALSE(bubble_content.custom_link_enabled);
951 EXPECT_EQ( 951 EXPECT_EQ(
952 bubble_content.manage_text, 952 bubble_content.manage_text,
953 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); 953 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD));
954 EXPECT_EQ(0U, bubble_content.media_menus.size()); 954 EXPECT_EQ(0U, bubble_content.media_menus.size());
955 } 955 }
OLDNEW
« 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