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