| OLD | NEW |
| 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/content_settings/host_content_settings_map.h" |
| 11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
| 12 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | 12 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 13 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 13 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 14 #include "chrome/browser/tab_contents/test_tab_contents.h" | 14 #include "chrome/browser/tab_contents/test_tab_contents.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/test/testing_profile.h" | 16 #include "chrome/test/testing_profile.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 class ContentSettingBubbleModelTest : public RenderViewHostTestHarness { | 19 class ContentSettingBubbleModelTest : public RenderViewHostTestHarness { |
| 20 protected: | 20 protected: |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 CheckGeolocationBubble(1, false, false); | 186 CheckGeolocationBubble(1, false, false); |
| 187 | 187 |
| 188 // 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. |
| 189 content_settings->OnGeolocationPermissionSet(frame2_url, false); | 189 content_settings->OnGeolocationPermissionSet(frame2_url, false); |
| 190 CheckGeolocationBubble(2, false, true); | 190 CheckGeolocationBubble(2, false, true); |
| 191 | 191 |
| 192 // 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. |
| 193 setting_map->SetDefaultContentSetting(CONTENT_SETTING_BLOCK); | 193 setting_map->SetDefaultContentSetting(CONTENT_SETTING_BLOCK); |
| 194 CheckGeolocationBubble(2, true, false); | 194 CheckGeolocationBubble(2, true, false); |
| 195 } | 195 } |
| OLD | NEW |