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 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 | 919 |
920 registry.Shutdown(); | 920 registry.Shutdown(); |
921 } | 921 } |
922 | 922 |
923 TEST_F(ContentSettingBubbleModelTest, SubresourceFilter) { | 923 TEST_F(ContentSettingBubbleModelTest, SubresourceFilter) { |
924 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model( | 924 std::unique_ptr<ContentSettingBubbleModel> content_setting_bubble_model( |
925 new ContentSettingSubresourceFilterBubbleModel(nullptr, web_contents(), | 925 new ContentSettingSubresourceFilterBubbleModel(nullptr, web_contents(), |
926 profile())); | 926 profile())); |
927 const ContentSettingBubbleModel::BubbleContent& bubble_content = | 927 const ContentSettingBubbleModel::BubbleContent& bubble_content = |
928 content_setting_bubble_model->bubble_content(); | 928 content_setting_bubble_model->bubble_content(); |
929 EXPECT_EQ(bubble_content.title, | 929 EXPECT_EQ( |
| 930 bubble_content.title, |
| 931 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_TITLE)); |
| 932 EXPECT_EQ(bubble_content.message, |
930 l10n_util::GetStringUTF8( | 933 l10n_util::GetStringUTF8( |
931 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); | 934 IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_EXPLANATION)); |
932 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size()); | 935 EXPECT_EQ(0U, bubble_content.radio_group.radio_items.size()); |
933 EXPECT_EQ(0, bubble_content.radio_group.default_item); | 936 EXPECT_EQ(0, bubble_content.radio_group.default_item); |
934 EXPECT_TRUE(bubble_content.custom_link.empty()); | 937 EXPECT_TRUE(bubble_content.custom_link.empty()); |
935 EXPECT_FALSE(bubble_content.custom_link_enabled); | 938 EXPECT_FALSE(bubble_content.custom_link_enabled); |
936 EXPECT_EQ( | 939 EXPECT_EQ( |
937 bubble_content.manage_link, | 940 bubble_content.manage_link, |
938 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); | 941 l10n_util::GetStringUTF8(IDS_FILTERED_DECEPTIVE_CONTENT_PROMPT_RELOAD)); |
939 EXPECT_EQ(0U, bubble_content.media_menus.size()); | 942 EXPECT_EQ(0U, bubble_content.media_menus.size()); |
940 } | 943 } |
OLD | NEW |