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