| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |