| 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 "chrome/browser/chrome_thread.h" |
| 7 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
| 9 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| 8 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 10 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 9 #include "chrome/browser/tab_contents/test_tab_contents.h" | 11 #include "chrome/browser/tab_contents/test_tab_contents.h" |
| 10 #include "chrome/test/testing_profile.h" | 12 #include "chrome/test/testing_profile.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 14 |
| 13 class ContentSettingBubbleModelTest : public RenderViewHostTestHarness { | 15 class ContentSettingBubbleModelTest : public RenderViewHostTestHarness { |
| 14 protected: | 16 protected: |
| 15 ContentSettingBubbleModelTest() | 17 ContentSettingBubbleModelTest() |
| 16 : ui_thread_(ChromeThread::UI, MessageLoop::current()) { | 18 : ui_thread_(ChromeThread::UI, MessageLoop::current()) { |
| 17 } | 19 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 CheckGeolocationBubble(1, false, false); | 122 CheckGeolocationBubble(1, false, false); |
| 121 | 123 |
| 122 // Second frame denied, but not stored in the content map: requires reload. | 124 // Second frame denied, but not stored in the content map: requires reload. |
| 123 content_settings->OnGeolocationPermissionSet(frame2_url, false); | 125 content_settings->OnGeolocationPermissionSet(frame2_url, false); |
| 124 CheckGeolocationBubble(2, false, true); | 126 CheckGeolocationBubble(2, false, true); |
| 125 | 127 |
| 126 // Change the default to block: offer a clear link for the persisted frame 1. | 128 // Change the default to block: offer a clear link for the persisted frame 1. |
| 127 setting_map->SetDefaultContentSetting(CONTENT_SETTING_BLOCK); | 129 setting_map->SetDefaultContentSetting(CONTENT_SETTING_BLOCK); |
| 128 CheckGeolocationBubble(2, true, false); | 130 CheckGeolocationBubble(2, true, false); |
| 129 } | 131 } |
| OLD | NEW |