Chromium Code Reviews| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 content_settings->OnContentAllowed(CONTENT_SETTINGS_TYPE_COOKIES); | 108 content_settings->OnContentAllowed(CONTENT_SETTINGS_TYPE_COOKIES); |
| 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 EXPECT_NE(radio1, bubble_content_2.radio_group.radio_items[0]); |
|
Bernhard Bauer
2015/06/05 14:23:46
Can we update this test so it tests something more
Deepak
2015/06/08 05:53:31
Done.
| |
| 119 EXPECT_EQ(radio1, bubble_content_2.radio_group.radio_items[0]); | 119 EXPECT_NE(radio2, bubble_content_2.radio_group.radio_items[1]); |
| 120 EXPECT_EQ(radio2, bubble_content_2.radio_group.radio_items[1]); | |
| 121 EXPECT_FALSE(bubble_content_2.custom_link.empty()); | 120 EXPECT_FALSE(bubble_content_2.custom_link.empty()); |
| 122 EXPECT_TRUE(bubble_content_2.custom_link_enabled); | 121 EXPECT_TRUE(bubble_content_2.custom_link_enabled); |
| 123 EXPECT_FALSE(bubble_content_2.manage_link.empty()); | 122 EXPECT_FALSE(bubble_content_2.manage_link.empty()); |
| 124 } | 123 } |
| 125 | 124 |
| 126 TEST_F(ContentSettingBubbleModelTest, MediastreamMicAndCamera) { | 125 TEST_F(ContentSettingBubbleModelTest, MediastreamMicAndCamera) { |
| 127 // Required to break dependency on BrowserMainLoop. | 126 // Required to break dependency on BrowserMainLoop. |
| 128 MediaCaptureDevicesDispatcher::GetInstance()-> | 127 MediaCaptureDevicesDispatcher::GetInstance()-> |
| 129 DisableDeviceEnumerationForTesting(); | 128 DisableDeviceEnumerationForTesting(); |
| 130 | 129 |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 962 { | 961 { |
| 963 ProtocolHandler handler = registry.GetHandlerFor("mailto"); | 962 ProtocolHandler handler = registry.GetHandlerFor("mailto"); |
| 964 ASSERT_FALSE(handler.IsEmpty()); | 963 ASSERT_FALSE(handler.IsEmpty()); |
| 965 EXPECT_EQ(CONTENT_SETTING_ALLOW, | 964 EXPECT_EQ(CONTENT_SETTING_ALLOW, |
| 966 content_settings->pending_protocol_handler_setting()); | 965 content_settings->pending_protocol_handler_setting()); |
| 967 EXPECT_FALSE(registry.IsIgnored(test_handler)); | 966 EXPECT_FALSE(registry.IsIgnored(test_handler)); |
| 968 } | 967 } |
| 969 | 968 |
| 970 registry.Shutdown(); | 969 registry.Shutdown(); |
| 971 } | 970 } |
| OLD | NEW |