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 "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 { | 912 { |
913 ProtocolHandler handler = registry.GetHandlerFor("mailto"); | 913 ProtocolHandler handler = registry.GetHandlerFor("mailto"); |
914 ASSERT_FALSE(handler.IsEmpty()); | 914 ASSERT_FALSE(handler.IsEmpty()); |
915 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 915 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
916 content_settings->pending_protocol_handler_setting()); | 916 content_settings->pending_protocol_handler_setting()); |
917 EXPECT_FALSE(registry.IsIgnored(test_handler)); | 917 EXPECT_FALSE(registry.IsIgnored(test_handler)); |
918 } | 918 } |
919 | 919 |
920 registry.Shutdown(); | 920 registry.Shutdown(); |
921 } | 921 } |
| 922 |
| 923 TEST_F(ContentSettingBubbleModelTest, SubresourceFilter) { |
| 924 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model( |
| 925 new ContentSettingSubresourceFilterBubbleModel(nullptr, web_contents(), |
| 926 profile())); |
| 927 const ContentSettingBubbleModel::BubbleContent& bubble_content = |
| 928 content_setting_bubble_model->bubble_content(); |
| 929 EXPECT_EQ(bubble_content.title, |
| 930 l10n_util::GetStringUTF8( |
| 931 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); |
| 932 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size()); |
| 933 EXPECT_EQ(0, bubble_content.radio_group.default_item); |
| 934 EXPECT_TRUE(bubble_content.custom_link.empty()); |
| 935 EXPECT_FALSE(bubble_content.custom_link_enabled); |
| 936 EXPECT_EQ( |
| 937 bubble_content.manage_link, |
| 938 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); |
| 939 EXPECT_EQ(0U, bubble_content.media_menus.size()); |
| 940 } |
OLD | NEW |