| 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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 10 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 content_setting_bubble_model.reset( | 109 content_setting_bubble_model.reset( |
| 110 ContentSettingBubbleModel::CreateContentSettingBubbleModel( | 110 ContentSettingBubbleModel::CreateContentSettingBubbleModel( |
| 111 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES)); | 111 NULL, web_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES)); |
| 112 const ContentSettingBubbleModel::BubbleContent& bubble_content_2 = | 112 const ContentSettingBubbleModel::BubbleContent& bubble_content_2 = |
| 113 content_setting_bubble_model->bubble_content(); | 113 content_setting_bubble_model->bubble_content(); |
| 114 | 114 |
| 115 EXPECT_FALSE(bubble_content_2.title.empty()); | 115 EXPECT_FALSE(bubble_content_2.title.empty()); |
| 116 EXPECT_NE(title, bubble_content_2.title); | 116 EXPECT_NE(title, bubble_content_2.title); |
| 117 ASSERT_EQ(2U, bubble_content_2.radio_group.radio_items.size()); | 117 ASSERT_EQ(2U, bubble_content_2.radio_group.radio_items.size()); |
| 118 // TODO(bauerb): Update this once the strings have been updated. | 118 // TODO(bauerb): Update this once the strings have been updated. |
| 119 EXPECT_EQ(radio1, bubble_content_2.radio_group.radio_items[0]); | 119 EXPECT_NE(radio1, bubble_content_2.radio_group.radio_items[0]); |
| 120 EXPECT_EQ(radio2, bubble_content_2.radio_group.radio_items[1]); | 120 EXPECT_NE(radio2, bubble_content_2.radio_group.radio_items[1]); |
| 121 EXPECT_FALSE(bubble_content_2.custom_link.empty()); | 121 EXPECT_FALSE(bubble_content_2.custom_link.empty()); |
| 122 EXPECT_TRUE(bubble_content_2.custom_link_enabled); | 122 EXPECT_TRUE(bubble_content_2.custom_link_enabled); |
| 123 EXPECT_FALSE(bubble_content_2.manage_link.empty()); | 123 EXPECT_FALSE(bubble_content_2.manage_link.empty()); |
| 124 } | 124 } |
| 125 | 125 |
| 126 TEST_F(ContentSettingBubbleModelTest, MediastreamMicAndCamera) { | 126 TEST_F(ContentSettingBubbleModelTest, MediastreamMicAndCamera) { |
| 127 // Required to break dependency on BrowserMainLoop. | 127 // Required to break dependency on BrowserMainLoop. |
| 128 MediaCaptureDevicesDispatcher::GetInstance()-> | 128 MediaCaptureDevicesDispatcher::GetInstance()-> |
| 129 DisableDeviceEnumerationForTesting(); | 129 DisableDeviceEnumerationForTesting(); |
| 130 | 130 |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 { | 962 { |
| 963 ProtocolHandler handler = registry.GetHandlerFor("mailto"); | 963 ProtocolHandler handler = registry.GetHandlerFor("mailto"); |
| 964 ASSERT_FALSE(handler.IsEmpty()); | 964 ASSERT_FALSE(handler.IsEmpty()); |
| 965 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 965 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
| 966 content_settings->pending_protocol_handler_setting()); | 966 content_settings->pending_protocol_handler_setting()); |
| 967 EXPECT_FALSE(registry.IsIgnored(test_handler)); | 967 EXPECT_FALSE(registry.IsIgnored(test_handler)); |
| 968 } | 968 } |
| 969 | 969 |
| 970 registry.Shutdown(); | 970 registry.Shutdown(); |
| 971 } | 971 } |
| OLD | NEW |