Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: chrome/browser/content_settings/content_settings_policy_provider_unittest.cc

Issue 596613002: Remove content dependencies from content settings providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shutdown fix Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
diff --git a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
index 0497b0c7f12a6eed15b505e4553c6e8880d94880..ef16eff6e31d988fa6d899c5e78a727eb4c85758 100644
--- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
@@ -9,7 +9,6 @@
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
#include "chrome/browser/content_settings/content_settings_mock_observer.h"
#include "chrome/browser/content_settings/content_settings_utils.h"
@@ -19,33 +18,16 @@
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
#include "components/content_settings/core/browser/content_settings_rule.h"
-#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
using ::testing::_;
-using content::BrowserThread;
namespace content_settings {
typedef std::vector<Rule> Rules;
-class PolicyProviderTest : public testing::Test {
- public:
- PolicyProviderTest()
- : ui_thread_(BrowserThread::UI, &message_loop_) {
- }
-
- protected:
- // TODO(markusheintz): Check if it's possible to derive the provider class
- // from NonThreadSafe and to use native thread identifiers instead of
- // BrowserThread IDs. Then we could get rid of the message_loop and ui_thread
- // fields.
- base::MessageLoop message_loop_;
- content::TestBrowserThread ui_thread_;
Bernhard Bauer 2014/09/23 10:08:19 There is content::TestBrowserThreadBundle now to r
Jun Mukai 2014/09/23 20:48:44 The point of this CL is to remove content/ depende
Bernhard Bauer 2014/09/24 08:15:31 Fair enough. Ideally, we'd have something to enfor
-};
-
-TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) {
+TEST(PolicyProviderTest, DefaultGeolocationContentSetting) {
TestingProfile profile;
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
PolicyProvider provider(prefs);
@@ -79,7 +61,7 @@ TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) {
provider.ShutdownOnUIThread();
}
-TEST_F(PolicyProviderTest, ManagedDefaultContentSettings) {
+TEST(PolicyProviderTest, ManagedDefaultContentSettings) {
TestingProfile profile;
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
PolicyProvider provider(prefs);
@@ -106,7 +88,7 @@ TEST_F(PolicyProviderTest, ManagedDefaultContentSettings) {
// When a default-content-setting is set to a managed setting a
// CONTENT_SETTINGS_CHANGED notification should be fired. The same should happen
// if the managed setting is removed.
-TEST_F(PolicyProviderTest, ObserveManagedSettingsChange) {
+TEST(PolicyProviderTest, ObserveManagedSettingsChange) {
TestingProfile profile;
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
PolicyProvider provider(prefs);
@@ -133,7 +115,7 @@ TEST_F(PolicyProviderTest, ObserveManagedSettingsChange) {
provider.ShutdownOnUIThread();
}
-TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
+TEST(PolicyProviderTest, GettingManagedContentSettings) {
TestingProfile profile;
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
@@ -205,7 +187,7 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
provider.ShutdownOnUIThread();
}
-TEST_F(PolicyProviderTest, ResourceIdentifier) {
+TEST(PolicyProviderTest, ResourceIdentifier) {
TestingProfile profile;
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
@@ -242,7 +224,7 @@ TEST_F(PolicyProviderTest, ResourceIdentifier) {
provider.ShutdownOnUIThread();
}
-TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
+TEST(PolicyProviderTest, AutoSelectCertificateList) {
TestingProfile profile;
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();

Powered by Google App Engine
This is Rietveld 408576698