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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 10 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
11 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 11 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
12 #include "chrome/browser/prefs/browser_prefs.h" | 12 #include "chrome/browser/prefs/browser_prefs.h" |
13 #include "chrome/browser/prefs/command_line_pref_store.h" | 13 #include "chrome/browser/prefs/command_line_pref_store.h" |
14 #include "chrome/browser/prefs/pref_change_registrar.h" | 14 #include "chrome/browser/prefs/pref_change_registrar.h" |
15 #include "chrome/browser/prefs/pref_observer_mock.h" | 15 #include "chrome/browser/prefs/pref_observer_mock.h" |
16 #include "chrome/browser/prefs/pref_service_mock_builder.h" | 16 #include "chrome/browser/prefs/pref_service_mock_builder.h" |
17 #include "chrome/browser/prefs/pref_value_store.h" | 17 #include "chrome/browser/prefs/pref_value_store.h" |
18 #include "chrome/browser/prefs/testing_pref_store.h" | 18 #include "chrome/browser/prefs/testing_pref_store.h" |
19 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/test/testing_pref_service.h" | 22 #include "chrome/test/base/testing_pref_service.h" |
23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 #include "ui/base/test/data/resource.h" | 25 #include "ui/base/test/data/resource.h" |
26 | 26 |
27 using testing::_; | 27 using testing::_; |
28 using testing::Mock; | 28 using testing::Mock; |
29 | 29 |
30 // TODO(port): port this test to POSIX. | 30 // TODO(port): port this test to POSIX. |
31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
32 TEST(PrefServiceTest, LocalizedPrefs) { | 32 TEST(PrefServiceTest, LocalizedPrefs) { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 EXPECT_CALL(observer_, Observe(_, _, _)).Times(0); | 249 EXPECT_CALL(observer_, Observe(_, _, _)).Times(0); |
250 prefs_.Set(kName, new_value); | 250 prefs_.Set(kName, new_value); |
251 Mock::VerifyAndClearExpectations(&observer_); | 251 Mock::VerifyAndClearExpectations(&observer_); |
252 | 252 |
253 ListValue empty; | 253 ListValue empty; |
254 observer_.Expect(&prefs_, kName, &empty); | 254 observer_.Expect(&prefs_, kName, &empty); |
255 prefs_.Set(kName, empty); | 255 prefs_.Set(kName, empty); |
256 Mock::VerifyAndClearExpectations(&observer_); | 256 Mock::VerifyAndClearExpectations(&observer_); |
257 } | 257 } |
OLD | NEW |