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

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

Issue 2552343005: [HBD] Remove radio buttons from the Plugins Blocked Omnibox popup. (Closed)
Patch Set: remove unneeded variable 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 728
729 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model( 729 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
730 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 730 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
731 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_PLUGINS)); 731 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_PLUGINS));
732 const ContentSettingBubbleModel::BubbleContent& bubble_content = 732 const ContentSettingBubbleModel::BubbleContent& bubble_content =
733 content_setting_bubble_model->bubble_content(); 733 content_setting_bubble_model->bubble_content();
734 EXPECT_FALSE(bubble_content.title.empty()); 734 EXPECT_FALSE(bubble_content.title.empty());
735 ASSERT_EQ(1U, bubble_content.list_items.size()); 735 ASSERT_EQ(1U, bubble_content.list_items.size());
736 EXPECT_EQ(plugin_name, 736 EXPECT_EQ(plugin_name,
737 base::ASCIIToUTF16(bubble_content.list_items[0].title)); 737 base::ASCIIToUTF16(bubble_content.list_items[0].title));
738 EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size()); 738 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size());
739 EXPECT_FALSE(bubble_content.custom_link.empty()); 739 EXPECT_FALSE(bubble_content.custom_link.empty());
740 EXPECT_TRUE(bubble_content.custom_link_enabled); 740 EXPECT_TRUE(bubble_content.custom_link_enabled);
741 EXPECT_FALSE(bubble_content.manage_text.empty()); 741 EXPECT_FALSE(bubble_content.manage_text.empty());
742 EXPECT_FALSE(bubble_content.learn_more_link.empty()); 742 EXPECT_FALSE(bubble_content.learn_more_link.empty());
743 } 743 }
744 744
745 TEST_F(ContentSettingBubbleModelTest, PepperBroker) { 745 TEST_F(ContentSettingBubbleModelTest, PepperBroker) {
746 WebContentsTester::For(web_contents())-> 746 WebContentsTester::For(web_contents())->
747 NavigateAndCommit(GURL("https://www.example.com")); 747 NavigateAndCommit(GURL("https://www.example.com"));
748 TabSpecificContentSettings* content_settings = 748 TabSpecificContentSettings* content_settings =
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES); 988 content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES);
989 989
990 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model( 990 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
991 ContentSettingBubbleModel::CreateContentSettingBubbleModel( 991 ContentSettingBubbleModel::CreateContentSettingBubbleModel(
992 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES)); 992 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES));
993 const ContentSettingBubbleModel::BubbleContent& bubble_content = 993 const ContentSettingBubbleModel::BubbleContent& bubble_content =
994 content_setting_bubble_model->bubble_content(); 994 content_setting_bubble_model->bubble_content();
995 995
996 EXPECT_FALSE(bubble_content.radio_group_enabled); 996 EXPECT_FALSE(bubble_content.radio_group_enabled);
997 } 997 }
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