| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_settings/content_settings_policy_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_policy_provider.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/content_settings/content_settings_mock_observer.h" | 9 #include "chrome/browser/content_settings/content_settings_mock_observer.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 EXPECT_CALL(mock_observer, | 120 EXPECT_CALL(mock_observer, |
| 121 OnContentSettingChanged(_, | 121 OnContentSettingChanged(_, |
| 122 _, | 122 _, |
| 123 CONTENT_SETTINGS_TYPE_DEFAULT, | 123 CONTENT_SETTINGS_TYPE_DEFAULT, |
| 124 "")); | 124 "")); |
| 125 // Remove the managed default-content-setting. | 125 // Remove the managed default-content-setting. |
| 126 prefs->RemoveManagedPref(prefs::kManagedDefaultImagesSetting); | 126 prefs->RemoveManagedPref(prefs::kManagedDefaultImagesSetting); |
| 127 provider.ShutdownOnUIThread(); | 127 provider.ShutdownOnUIThread(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 class PolicyProviderTest : public testing::Test { | 130 class PolicyProviderTest : public TestingBrowserProcessTest { |
| 131 public: | 131 public: |
| 132 PolicyProviderTest() | 132 PolicyProviderTest() |
| 133 : ui_thread_(BrowserThread::UI, &message_loop_) { | 133 : ui_thread_(BrowserThread::UI, &message_loop_) { |
| 134 } | 134 } |
| 135 | 135 |
| 136 protected: | 136 protected: |
| 137 // TODO(markusheintz): Check if it's possible to derive the provider class | 137 // TODO(markusheintz): Check if it's possible to derive the provider class |
| 138 // from NonThreadSafe and to use native thread identifiers instead of | 138 // from NonThreadSafe and to use native thread identifiers instead of |
| 139 // BrowserThread IDs. Then we could get rid of the message_loop and ui_thread | 139 // BrowserThread IDs. Then we could get rid of the message_loop and ui_thread |
| 140 // fields. | 140 // fields. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 provider.GetContentSetting( | 217 provider.GetContentSetting( |
| 218 google_url, | 218 google_url, |
| 219 google_url, | 219 google_url, |
| 220 CONTENT_SETTINGS_TYPE_PLUGINS, | 220 CONTENT_SETTINGS_TYPE_PLUGINS, |
| 221 "someplugin")); | 221 "someplugin")); |
| 222 | 222 |
| 223 provider.ShutdownOnUIThread(); | 223 provider.ShutdownOnUIThread(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace content_settings | 226 } // namespace content_settings |
| OLD | NEW |