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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc

Issue 7892007: Add ChromeRenderViewHostTestHarness to get rid of the dependency from RVHTH to profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 9 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
index ef8faf7fd7cb849d0e0ea63bbfcd8119f2c901c6..67f9af909f83566563e207394833d78e463f9f16 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
@@ -27,7 +27,7 @@ class ContentSettingBubbleModelTest : public TabContentsWrapperTestHarness {
bool expect_reload_hint) {
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, contents_wrapper(), profile_.get(),
+ NULL, contents_wrapper(), profile(),
CONTENT_SETTINGS_TYPE_GEOLOCATION));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
@@ -52,7 +52,7 @@ TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, contents_wrapper(), profile_.get(),
+ NULL, contents_wrapper(), profile(),
CONTENT_SETTINGS_TYPE_IMAGES));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
@@ -71,7 +71,7 @@ TEST_F(ContentSettingBubbleModelTest, Cookies) {
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, contents_wrapper(), profile_.get(),
+ NULL, contents_wrapper(), profile(),
CONTENT_SETTINGS_TYPE_COOKIES));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
@@ -90,7 +90,7 @@ TEST_F(ContentSettingBubbleModelTest, Plugins) {
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, contents_wrapper(), profile_.get(),
+ NULL, contents_wrapper(), profile(),
CONTENT_SETTINGS_TYPE_PLUGINS));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
@@ -107,7 +107,7 @@ TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) {
cmd->AppendSwitch(switches::kEnableResourceContentSettings);
cmd->AppendSwitch(switches::kEnableClickToPlay);
- HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
+ HostContentSettingsMap* map = profile()->GetHostContentSettingsMap();
std::string fooPlugin = "foo";
std::string barPlugin = "bar";
@@ -135,7 +135,7 @@ TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) {
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, contents_wrapper(), profile_.get(),
+ NULL, contents_wrapper(), profile(),
CONTENT_SETTINGS_TYPE_PLUGINS));
const ContentSettingBubbleModel::BubbleContent& bubble_content =
content_setting_bubble_model->bubble_content();
@@ -184,7 +184,7 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
// Add it to the content map, should now have a clear link.
HostContentSettingsMap* setting_map =
- profile_->GetHostContentSettingsMap();
+ profile()->GetHostContentSettingsMap();
setting_map->SetContentSetting(
ContentSettingsPattern::FromURLNoWildcard(frame1_url),
ContentSettingsPattern::FromURLNoWildcard(page_url),
@@ -194,7 +194,7 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
CheckGeolocationBubble(1, true, false);
// Change the default to allow: no message needed.
- profile_->GetHostContentSettingsMap()->SetDefaultContentSetting(
+ profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_ALLOW);
CheckGeolocationBubble(1, false, false);
@@ -203,7 +203,7 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
CheckGeolocationBubble(2, false, true);
// Change the default to block: offer a clear link for the persisted frame 1.
- profile_->GetHostContentSettingsMap()->SetDefaultContentSetting(
+ profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_BLOCK);
CheckGeolocationBubble(2, true, false);
}
@@ -213,7 +213,7 @@ TEST_F(ContentSettingBubbleModelTest, FileURL) {
NavigateAndCommit(GURL(file_url));
scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- NULL, contents_wrapper(), profile_.get(),
+ NULL, contents_wrapper(), profile(),
CONTENT_SETTINGS_TYPE_IMAGES));
std::string title =
content_setting_bubble_model->bubble_content().radio_group.radio_items[0];

Powered by Google App Engine
This is Rietveld 408576698