Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / content_settings / content_settings_policy_provider_unittest.cc
index 0497b0c..0bf6e4d 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "chrome/browser/content_settings/content_settings_policy_provider.h"
+#include "components/content_settings/core/browser/content_settings_policy_provider.h"
 
 #include <string>
 
 #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"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/url_constants.h"
 #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 "components/content_settings/core/browser/content_settings_utils.h"
+#include "components/content_settings/core/test/content_settings_test_utils.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_;
-};
-
-TEST_F(PolicyProviderTest, DefaultGeolocationContentSetting) {
+TEST(PolicyProviderTest, DefaultGeolocationContentSetting) {
   TestingProfile profile;
   TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
   PolicyProvider provider(prefs);
@@ -79,7 +63,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 +90,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 +117,7 @@ TEST_F(PolicyProviderTest, ObserveManagedSettingsChange) {
   provider.ShutdownOnUIThread();
 }
 
-TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
+TEST(PolicyProviderTest, GettingManagedContentSettings) {
   TestingProfile profile;
   TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
 
@@ -205,7 +189,7 @@ TEST_F(PolicyProviderTest, GettingManagedContentSettings) {
   provider.ShutdownOnUIThread();
 }
 
-TEST_F(PolicyProviderTest, ResourceIdentifier) {
+TEST(PolicyProviderTest, ResourceIdentifier) {
   TestingProfile profile;
   TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();
 
@@ -242,7 +226,7 @@ TEST_F(PolicyProviderTest, ResourceIdentifier) {
   provider.ShutdownOnUIThread();
 }
 
-TEST_F(PolicyProviderTest, AutoSelectCertificateList) {
+TEST(PolicyProviderTest, AutoSelectCertificateList) {
   TestingProfile profile;
   TestingPrefServiceSyncable* prefs = profile.GetTestingPrefService();