Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: chrome/browser/content_setting_bubble_model_unittest.cc

Issue 5238002: Reintegrate 552 r66225-r66645.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/content_setting_bubble_model.h" 5 #include "chrome/browser/content_setting_bubble_model.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 "chrome/browser/browser_thread.h" 9 #include "chrome/browser/browser_thread.h"
10 #include "chrome/browser/host_content_settings_map.h" 10 #include "chrome/browser/host_content_settings_map.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_NE(std::string(), bubble_content.manage_link); 102 EXPECT_NE(std::string(), bubble_content.manage_link);
103 EXPECT_EQ(std::string(), bubble_content.info_link); 103 EXPECT_EQ(std::string(), bubble_content.info_link);
104 EXPECT_NE(std::string(), bubble_content.title); 104 EXPECT_NE(std::string(), bubble_content.title);
105 EXPECT_NE(std::string(), bubble_content.load_plugins_link_title); 105 EXPECT_NE(std::string(), bubble_content.load_plugins_link_title);
106 } 106 }
107 107
108 TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) { 108 TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) {
109 CommandLine* cmd = CommandLine::ForCurrentProcess(); 109 CommandLine* cmd = CommandLine::ForCurrentProcess();
110 AutoReset<CommandLine> auto_reset(cmd, *cmd); 110 AutoReset<CommandLine> auto_reset(cmd, *cmd);
111 cmd->AppendSwitch(switches::kEnableResourceContentSettings); 111 cmd->AppendSwitch(switches::kEnableResourceContentSettings);
112 cmd->AppendSwitch(switches::kEnableClickToPlay);
112 113
113 HostContentSettingsMap* map = profile_->GetHostContentSettingsMap(); 114 HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
114 std::string fooPlugin = "foo"; 115 std::string fooPlugin = "foo";
115 std::string barPlugin = "bar"; 116 std::string barPlugin = "bar";
116 GURL url = contents()->GetURL(); 117 GURL url = contents()->GetURL();
117 map->AddExceptionForURL(url, 118 map->AddExceptionForURL(url,
118 CONTENT_SETTINGS_TYPE_PLUGINS, 119 CONTENT_SETTINGS_TYPE_PLUGINS,
119 fooPlugin, 120 fooPlugin,
120 CONTENT_SETTING_ALLOW); 121 CONTENT_SETTING_ALLOW);
121 map->AddExceptionForURL(url, 122 map->AddExceptionForURL(url,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 CheckGeolocationBubble(1, false, false); 186 CheckGeolocationBubble(1, false, false);
186 187
187 // Second frame denied, but not stored in the content map: requires reload. 188 // Second frame denied, but not stored in the content map: requires reload.
188 content_settings->OnGeolocationPermissionSet(frame2_url, false); 189 content_settings->OnGeolocationPermissionSet(frame2_url, false);
189 CheckGeolocationBubble(2, false, true); 190 CheckGeolocationBubble(2, false, true);
190 191
191 // Change the default to block: offer a clear link for the persisted frame 1. 192 // Change the default to block: offer a clear link for the persisted frame 1.
192 setting_map->SetDefaultContentSetting(CONTENT_SETTING_BLOCK); 193 setting_map->SetDefaultContentSetting(CONTENT_SETTING_BLOCK);
193 CheckGeolocationBubble(2, true, false); 194 CheckGeolocationBubble(2, true, false);
194 } 195 }
OLDNEW
« no previous file with comments | « chrome/browser/content_setting_bubble_model.cc ('k') | chrome/browser/content_setting_combo_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698