| 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 c85972fbfc0513f4373ca1ebd56c85da5e2606be..f8a284cb8e03287048a7c3cdf9873b8d61d9c9ea 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
|
| @@ -9,7 +9,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
|
| -#include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
|
| +#include "chrome/browser/ui/tab_contents/test_tab_contents.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -20,7 +20,7 @@
|
| using content::BrowserThread;
|
| using content::WebContentsTester;
|
|
|
| -class ContentSettingBubbleModelTest : public TabContentsWrapperTestHarness {
|
| +class ContentSettingBubbleModelTest : public TabContentsTestHarness {
|
| protected:
|
| ContentSettingBubbleModelTest()
|
| : ui_thread_(BrowserThread::UI, MessageLoop::current()) {
|
| @@ -31,7 +31,7 @@ class ContentSettingBubbleModelTest : public TabContentsWrapperTestHarness {
|
| bool expect_reload_hint) {
|
| scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| - NULL, contents_wrapper(), profile(),
|
| + NULL, tab_contents(), profile(),
|
| CONTENT_SETTINGS_TYPE_GEOLOCATION));
|
| const ContentSettingBubbleModel::BubbleContent& bubble_content =
|
| content_setting_bubble_model->bubble_content();
|
| @@ -50,14 +50,13 @@ class ContentSettingBubbleModelTest : public TabContentsWrapperTestHarness {
|
|
|
| TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
|
| TabSpecificContentSettings* content_settings =
|
| - contents_wrapper()->content_settings();
|
| + tab_contents()->content_settings();
|
| content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_IMAGES,
|
| std::string());
|
|
|
| scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| - NULL, contents_wrapper(), profile(),
|
| - CONTENT_SETTINGS_TYPE_IMAGES));
|
| + NULL, tab_contents(), profile(), CONTENT_SETTINGS_TYPE_IMAGES));
|
| const ContentSettingBubbleModel::BubbleContent& bubble_content =
|
| content_setting_bubble_model->bubble_content();
|
| EXPECT_FALSE(bubble_content.title.empty());
|
| @@ -69,14 +68,13 @@ TEST_F(ContentSettingBubbleModelTest, ImageRadios) {
|
|
|
| TEST_F(ContentSettingBubbleModelTest, Cookies) {
|
| TabSpecificContentSettings* content_settings =
|
| - contents_wrapper()->content_settings();
|
| + tab_contents()->content_settings();
|
| content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES,
|
| std::string());
|
|
|
| scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| - NULL, contents_wrapper(), profile(),
|
| - CONTENT_SETTINGS_TYPE_COOKIES));
|
| + NULL, tab_contents(), profile(), CONTENT_SETTINGS_TYPE_COOKIES));
|
| const ContentSettingBubbleModel::BubbleContent& bubble_content =
|
| content_setting_bubble_model->bubble_content();
|
| EXPECT_FALSE(bubble_content.title.empty());
|
| @@ -88,13 +86,13 @@ TEST_F(ContentSettingBubbleModelTest, Cookies) {
|
|
|
| TEST_F(ContentSettingBubbleModelTest, Plugins) {
|
| TabSpecificContentSettings* content_settings =
|
| - contents_wrapper()->content_settings();
|
| + tab_contents()->content_settings();
|
| content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS,
|
| std::string());
|
|
|
| scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| - NULL, contents_wrapper(), profile(),
|
| + NULL, tab_contents(), profile(),
|
| CONTENT_SETTINGS_TYPE_PLUGINS));
|
| const ContentSettingBubbleModel::BubbleContent& bubble_content =
|
| content_setting_bubble_model->bubble_content();
|
| @@ -131,7 +129,7 @@ TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) {
|
| CONTENT_SETTING_ASK);
|
|
|
| TabSpecificContentSettings* content_settings =
|
| - contents_wrapper()->content_settings();
|
| + tab_contents()->content_settings();
|
| content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS,
|
| fooPlugin);
|
| content_settings->OnContentBlocked(CONTENT_SETTINGS_TYPE_PLUGINS,
|
| @@ -139,8 +137,7 @@ TEST_F(ContentSettingBubbleModelTest, MultiplePlugins) {
|
|
|
| scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| - NULL, contents_wrapper(), profile(),
|
| - CONTENT_SETTINGS_TYPE_PLUGINS));
|
| + NULL, tab_contents(), profile(), CONTENT_SETTINGS_TYPE_PLUGINS));
|
| const ContentSettingBubbleModel::BubbleContent& bubble_content =
|
| content_setting_bubble_model->bubble_content();
|
| EXPECT_EQ(2U, bubble_content.radio_group.radio_items.size());
|
| @@ -180,7 +177,7 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
|
|
|
| NavigateAndCommit(page_url);
|
| TabSpecificContentSettings* content_settings =
|
| - contents_wrapper()->content_settings();
|
| + tab_contents()->content_settings();
|
|
|
| // One permitted frame, but not in the content map: requires reload.
|
| content_settings->OnGeolocationPermissionSet(frame1_url, true);
|
| @@ -217,7 +214,7 @@ TEST_F(ContentSettingBubbleModelTest, FileURL) {
|
| NavigateAndCommit(GURL(file_url));
|
| scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model(
|
| ContentSettingBubbleModel::CreateContentSettingBubbleModel(
|
| - NULL, contents_wrapper(), profile(),
|
| + NULL, tab_contents(), profile(),
|
| CONTENT_SETTINGS_TYPE_IMAGES));
|
| std::string title =
|
| content_setting_bubble_model->bubble_content().radio_group.radio_items[0];
|
|
|