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/prefs/pref_service.h" | |
10 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 11 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
13 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
14 #include "chrome/browser/infobars/infobar_service.h" | 13 #include "chrome/browser/infobars/infobar_service.h" |
15 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 14 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
16 #include "chrome/browser/media/media_stream_capture_indicator.h" | 15 #include "chrome/browser/media/media_stream_capture_indicator.h" |
17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 17 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
19 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
21 #include "chrome/grit/generated_resources.h" | 20 #include "chrome/grit/generated_resources.h" |
22 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 21 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
23 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
24 #include "components/content_settings/core/browser/host_content_settings_map.h" | 23 #include "components/content_settings/core/browser/host_content_settings_map.h" |
25 #include "components/content_settings/core/common/content_settings.h" | 24 #include "components/content_settings/core/common/content_settings.h" |
26 #include "components/infobars/core/infobar_delegate.h" | 25 #include "components/infobars/core/infobar_delegate.h" |
| 26 #include "components/prefs/pref_service.h" |
27 #include "components/url_formatter/elide_url.h" | 27 #include "components/url_formatter/elide_url.h" |
28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
29 #include "content/public/test/web_contents_tester.h" | 29 #include "content/public/test/web_contents_tester.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 | 32 |
33 using content::WebContentsTester; | 33 using content::WebContentsTester; |
34 | 34 |
35 class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness { | 35 class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness { |
36 protected: | 36 protected: |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 { | 950 { |
951 ProtocolHandler handler = registry.GetHandlerFor("mailto"); | 951 ProtocolHandler handler = registry.GetHandlerFor("mailto"); |
952 ASSERT_FALSE(handler.IsEmpty()); | 952 ASSERT_FALSE(handler.IsEmpty()); |
953 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 953 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
954 content_settings->pending_protocol_handler_setting()); | 954 content_settings->pending_protocol_handler_setting()); |
955 EXPECT_FALSE(registry.IsIgnored(test_handler)); | 955 EXPECT_FALSE(registry.IsIgnored(test_handler)); |
956 } | 956 } |
957 | 957 |
958 registry.Shutdown(); | 958 registry.Shutdown(); |
959 } | 959 } |
OLD | NEW |