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 "chrome/browser/content_settings/host_content_settings_map.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map.h" |
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 10 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
12 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 12 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "content/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 #include "content/test/web_contents_tester.h" | 17 #include "content/test/web_contents_tester.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
21 using content::WebContentsTester; | 21 using content::WebContentsTester; |
22 | 22 |
23 class ContentSettingBubbleModelTest : public TabContentsWrapperTestHarness { | 23 class ContentSettingBubbleModelTest : public TabContentsWrapperTestHarness { |
24 protected: | 24 protected: |
25 ContentSettingBubbleModelTest() | 25 ContentSettingBubbleModelTest() |
26 : ui_thread_(BrowserThread::UI, MessageLoop::current()) { | 26 : ui_thread_(BrowserThread::UI, MessageLoop::current()) { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 std::string file_url("file:///tmp/test.html"); | 216 std::string file_url("file:///tmp/test.html"); |
217 NavigateAndCommit(GURL(file_url)); | 217 NavigateAndCommit(GURL(file_url)); |
218 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( | 218 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model( |
219 ContentSettingBubbleModel::CreateContentSettingBubbleModel( | 219 ContentSettingBubbleModel::CreateContentSettingBubbleModel( |
220 NULL, contents_wrapper(), profile(), | 220 NULL, contents_wrapper(), profile(), |
221 CONTENT_SETTINGS_TYPE_IMAGES)); | 221 CONTENT_SETTINGS_TYPE_IMAGES)); |
222 std::string title = | 222 std::string title = |
223 content_setting_bubble_model->bubble_content().radio_group.radio_items[0]; | 223 content_setting_bubble_model->bubble_content().radio_group.radio_items[0]; |
224 ASSERT_NE(std::string::npos, title.find(file_url)); | 224 ASSERT_NE(std::string::npos, title.find(file_url)); |
225 } | 225 } |
OLD | NEW |