| 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 "base/auto_reset.h" | 5 #include "base/auto_reset.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 9 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 10 #include "chrome/browser/infobars/infobar_service.h" | 10 #include "chrome/browser/infobars/infobar_service.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "components/infobars/core/infobar_delegate.h" | 21 #include "components/infobars/core/infobar_delegate.h" |
| 22 #include "content/public/browser/web_contents.h" | 22 #include "content/public/browser/web_contents.h" |
| 23 #include "content/public/test/web_contents_tester.h" | 23 #include "content/public/test/web_contents_tester.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
| 26 | 26 |
| 27 using content::WebContentsTester; | 27 using content::WebContentsTester; |
| 28 | 28 |
| 29 class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness { | 29 class ContentSettingBubbleModelTest : public ChromeRenderViewHostTestHarness { |
| 30 protected: | 30 protected: |
| 31 virtual void SetUp() override { | 31 void SetUp() override { |
| 32 ChromeRenderViewHostTestHarness::SetUp(); | 32 ChromeRenderViewHostTestHarness::SetUp(); |
| 33 TabSpecificContentSettings::CreateForWebContents(web_contents()); | 33 TabSpecificContentSettings::CreateForWebContents(web_contents()); |
| 34 InfoBarService::CreateForWebContents(web_contents()); | 34 InfoBarService::CreateForWebContents(web_contents()); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void CheckGeolocationBubble(size_t expected_domains, | 37 void CheckGeolocationBubble(size_t expected_domains, |
| 38 bool expect_clear_link, | 38 bool expect_clear_link, |
| 39 bool expect_reload_hint) { | 39 bool expect_reload_hint) { |
| 40 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( | 40 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( |
| 41 ContentSettingBubbleModel::CreateContentSettingBubbleModel( | 41 ContentSettingBubbleModel::CreateContentSettingBubbleModel( |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 { | 895 { |
| 896 ProtocolHandler handler = registry.GetHandlerFor("mailto"); | 896 ProtocolHandler handler = registry.GetHandlerFor("mailto"); |
| 897 ASSERT_FALSE(handler.IsEmpty()); | 897 ASSERT_FALSE(handler.IsEmpty()); |
| 898 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 898 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
| 899 content_settings->pending_protocol_handler_setting()); | 899 content_settings->pending_protocol_handler_setting()); |
| 900 EXPECT_FALSE(registry.IsIgnored(test_handler)); | 900 EXPECT_FALSE(registry.IsIgnored(test_handler)); |
| 901 } | 901 } |
| 902 | 902 |
| 903 registry.Shutdown(); | 903 registry.Shutdown(); |
| 904 } | 904 } |
| OLD | NEW |