Index: chrome/browser/content_settings/host_content_settings_map_unittest.cc |
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
index e0e65d396dc2c5d56b97180cdeb9b79f7a8d44d4..bc1adf207964a84e3a1be2abf0a2502a2620f569 100644 |
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
@@ -6,7 +6,6 @@ |
#include "base/command_line.h" |
#include "base/json/json_reader.h" |
#include "base/json/json_writer.h" |
-#include "base/message_loop/message_loop.h" |
#include "base/prefs/pref_service.h" |
#include "base/prefs/scoped_user_pref_update.h" |
#include "chrome/browser/content_settings/content_settings_mock_observer.h" |
@@ -19,26 +18,13 @@ |
#include "chrome/test/base/testing_pref_service_syncable.h" |
#include "chrome/test/base/testing_profile.h" |
#include "components/content_settings/core/browser/content_settings_details.h" |
-#include "content/public/test/test_browser_thread.h" |
#include "net/base/static_cookie_policy.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "url/gurl.h" |
-using content::BrowserThread; |
- |
using ::testing::_; |
-class HostContentSettingsMapTest : public testing::Test { |
- public: |
- HostContentSettingsMapTest() : ui_thread_(BrowserThread::UI, &message_loop_) { |
- } |
- |
- protected: |
- base::MessageLoop message_loop_; |
- content::TestBrowserThread ui_thread_; |
-}; |
- |
-TEST_F(HostContentSettingsMapTest, DefaultValues) { |
+TEST(HostContentSettingsMapTest, DefaultValues) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -71,7 +57,7 @@ TEST_F(HostContentSettingsMapTest, DefaultValues) { |
CONTENT_SETTINGS_TYPE_POPUPS, NULL)); |
} |
-TEST_F(HostContentSettingsMapTest, IndividualSettings) { |
+TEST(HostContentSettingsMapTest, IndividualSettings) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -180,7 +166,7 @@ TEST_F(HostContentSettingsMapTest, IndividualSettings) { |
EXPECT_EQ(1U, host_settings.size()); |
} |
-TEST_F(HostContentSettingsMapTest, Clear) { |
+TEST(HostContentSettingsMapTest, Clear) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -227,7 +213,7 @@ TEST_F(HostContentSettingsMapTest, Clear) { |
EXPECT_EQ(2U, host_settings.size()); |
} |
-TEST_F(HostContentSettingsMapTest, Patterns) { |
+TEST(HostContentSettingsMapTest, Patterns) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -268,7 +254,7 @@ TEST_F(HostContentSettingsMapTest, Patterns) { |
host3, host3, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, Observer) { |
+TEST(HostContentSettingsMapTest, Observer) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -309,7 +295,7 @@ TEST_F(HostContentSettingsMapTest, Observer) { |
CONTENT_SETTINGS_TYPE_IMAGES, CONTENT_SETTING_BLOCK); |
} |
-TEST_F(HostContentSettingsMapTest, ObserveDefaultPref) { |
+TEST(HostContentSettingsMapTest, ObserveDefaultPref) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -345,7 +331,7 @@ TEST_F(HostContentSettingsMapTest, ObserveDefaultPref) { |
host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, ObserveExceptionPref) { |
+TEST(HostContentSettingsMapTest, ObserveExceptionPref) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -391,7 +377,7 @@ TEST_F(HostContentSettingsMapTest, ObserveExceptionPref) { |
host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, HostTrimEndingDotCheck) { |
+TEST(HostContentSettingsMapTest, HostTrimEndingDotCheck) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -546,7 +532,7 @@ TEST_F(HostContentSettingsMapTest, HostTrimEndingDotCheck) { |
std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, NestedSettings) { |
+TEST(HostContentSettingsMapTest, NestedSettings) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -612,7 +598,7 @@ TEST_F(HostContentSettingsMapTest, NestedSettings) { |
host, host, CONTENT_SETTINGS_TYPE_MOUSELOCK, std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, OffTheRecord) { |
+TEST(HostContentSettingsMapTest, OffTheRecord) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -665,7 +651,7 @@ TEST_F(HostContentSettingsMapTest, OffTheRecord) { |
// For a single Unicode encoded pattern, check if it gets converted to punycode |
// and old pattern gets deleted. |
-TEST_F(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeOnly) { |
+TEST(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeOnly) { |
TestingProfile profile; |
PrefService* prefs = profile.GetPrefs(); |
@@ -693,7 +679,7 @@ TEST_F(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeOnly) { |
// If both Unicode and its punycode pattern exist, make sure we don't touch the |
// settings for the punycode, and that Unicode pattern gets deleted. |
-TEST_F(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeAndPunycode) { |
+TEST(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeAndPunycode) { |
TestingProfile profile; |
scoped_ptr<base::Value> value(base::JSONReader::Read( |
@@ -718,7 +704,7 @@ TEST_F(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeAndPunycode) { |
// If a default-content-setting is managed, the managed value should be used |
// instead of the default value. |
-TEST_F(HostContentSettingsMapTest, ManagedDefaultContentSetting) { |
+TEST(HostContentSettingsMapTest, ManagedDefaultContentSetting) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -755,8 +741,7 @@ TEST_F(HostContentSettingsMapTest, ManagedDefaultContentSetting) { |
CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); |
} |
-TEST_F(HostContentSettingsMapTest, |
- GetNonDefaultContentSettingsIfTypeManaged) { |
+TEST(HostContentSettingsMapTest, GetNonDefaultContentSettingsIfTypeManaged) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -791,8 +776,8 @@ TEST_F(HostContentSettingsMapTest, |
// Managed default content setting should have higher priority |
// than user defined patterns. |
-TEST_F(HostContentSettingsMapTest, |
- ManagedDefaultContentSettingIgnoreUserPattern) { |
+TEST(HostContentSettingsMapTest, |
+ ManagedDefaultContentSettingIgnoreUserPattern) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -837,7 +822,7 @@ TEST_F(HostContentSettingsMapTest, |
// If a default-content-setting is set to managed setting, the user defined |
// setting should be preserved. |
-TEST_F(HostContentSettingsMapTest, OverwrittenDefaultContentSetting) { |
+TEST(HostContentSettingsMapTest, OverwrittenDefaultContentSetting) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -867,7 +852,7 @@ TEST_F(HostContentSettingsMapTest, OverwrittenDefaultContentSetting) { |
// If a setting for a default-content-setting-type is set while the type is |
// managed, then the new setting should be preserved and used after the |
// default-content-setting-type is not managed anymore. |
-TEST_F(HostContentSettingsMapTest, SettingDefaultContentSettingsWhenManaged) { |
+TEST(HostContentSettingsMapTest, SettingDefaultContentSettingsWhenManaged) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -891,7 +876,7 @@ TEST_F(HostContentSettingsMapTest, SettingDefaultContentSettingsWhenManaged) { |
CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); |
} |
-TEST_F(HostContentSettingsMapTest, GetContentSetting) { |
+TEST(HostContentSettingsMapTest, GetContentSetting) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -914,7 +899,7 @@ TEST_F(HostContentSettingsMapTest, GetContentSetting) { |
embedder, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, ShouldAllowAllContent) { |
+TEST(HostContentSettingsMapTest, ShouldAllowAllContent) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -948,7 +933,7 @@ TEST_F(HostContentSettingsMapTest, ShouldAllowAllContent) { |
extension, http_host, CONTENT_SETTINGS_TYPE_COOKIES)); |
} |
-TEST_F(HostContentSettingsMapTest, MigrateClearOnExit) { |
+TEST(HostContentSettingsMapTest, MigrateClearOnExit) { |
TestingProfile profile; |
TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService(); |
@@ -989,7 +974,7 @@ TEST_F(HostContentSettingsMapTest, MigrateClearOnExit) { |
std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, AddContentSettingsObserver) { |
+TEST(HostContentSettingsMapTest, AddContentSettingsObserver) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -1017,7 +1002,7 @@ TEST_F(HostContentSettingsMapTest, AddContentSettingsObserver) { |
CONTENT_SETTING_DEFAULT); |
} |
-TEST_F(HostContentSettingsMapTest, OverrideAllowedWebsiteSetting) { |
+TEST(HostContentSettingsMapTest, OverrideAllowedWebsiteSetting) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |
@@ -1049,7 +1034,7 @@ TEST_F(HostContentSettingsMapTest, OverrideAllowedWebsiteSetting) { |
host, host, CONTENT_SETTINGS_TYPE_GEOLOCATION, std::string())); |
} |
-TEST_F(HostContentSettingsMapTest, OverrideAllowedDefaultSetting) { |
+TEST(HostContentSettingsMapTest, OverrideAllowedDefaultSetting) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |
profile.GetHostContentSettingsMap(); |