| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/values.h" | 6 #include "base/values.h" |
| 7 #include "chrome/browser/prefs/pref_model_associator.h" | 7 #include "chrome/browser/prefs/pref_model_associator.h" |
| 8 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 8 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
| 10 #include "chrome/test/base/testing_browser_process_test.h" | |
| 11 #include "chrome/test/base/testing_profile.h" | 10 #include "chrome/test/base/testing_profile.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 class AbstractPreferenceMergeTest : public TestingBrowserProcessTest { | 13 class AbstractPreferenceMergeTest : public testing::Test { |
| 15 protected: | 14 protected: |
| 16 virtual void SetUp() { | 15 virtual void SetUp() { |
| 17 pref_service_ = profile_.GetPrefs(); | 16 pref_service_ = profile_.GetPrefs(); |
| 18 } | 17 } |
| 19 | 18 |
| 20 void SetContentPattern(DictionaryValue* patterns_dict, | 19 void SetContentPattern(DictionaryValue* patterns_dict, |
| 21 const std::string& expression, | 20 const std::string& expression, |
| 22 const std::string& content_type, | 21 const std::string& content_type, |
| 23 int setting) { | 22 int setting) { |
| 24 DictionaryValue* expression_dict; | 23 DictionaryValue* expression_dict; |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 EXPECT_TRUE(MergeListPreference(prefs::kDesktopNotificationDeniedOrigins)); | 393 EXPECT_TRUE(MergeListPreference(prefs::kDesktopNotificationDeniedOrigins)); |
| 395 } | 394 } |
| 396 | 395 |
| 397 TEST_F(IndividualPreferenceMergeTest, ContentSettingsPatterns) { | 396 TEST_F(IndividualPreferenceMergeTest, ContentSettingsPatterns) { |
| 398 EXPECT_TRUE(MergeDictionaryPreference(prefs::kContentSettingsPatterns)); | 397 EXPECT_TRUE(MergeDictionaryPreference(prefs::kContentSettingsPatterns)); |
| 399 } | 398 } |
| 400 | 399 |
| 401 TEST_F(IndividualPreferenceMergeTest, GeolocationContentSettings) { | 400 TEST_F(IndividualPreferenceMergeTest, GeolocationContentSettings) { |
| 402 EXPECT_TRUE(MergeDictionaryPreference(prefs::kGeolocationContentSettings)); | 401 EXPECT_TRUE(MergeDictionaryPreference(prefs::kGeolocationContentSettings)); |
| 403 } | 402 } |
| OLD | NEW |