OLD | NEW |
1 // Copyright (c) 2010 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 #ifndef CHROME_COMMON_PREF_STORE_OBSERVER_MOCK_H_ | 5 #ifndef CHROME_COMMON_PREF_STORE_OBSERVER_MOCK_H_ |
6 #define CHROME_COMMON_PREF_STORE_OBSERVER_MOCK_H_ | 6 #define CHROME_COMMON_PREF_STORE_OBSERVER_MOCK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "chrome/common/pref_store.h" | 10 #include "chrome/common/pref_store.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 | 12 |
13 // A gmock-ified implementation of PrefStore::Observer. | 13 // A gmock-ified implementation of PrefStore::Observer. |
14 class PrefStoreObserverMock : public PrefStore::Observer { | 14 class PrefStoreObserverMock : public PrefStore::Observer { |
15 public: | 15 public: |
16 PrefStoreObserverMock() {} | 16 PrefStoreObserverMock(); |
17 virtual ~PrefStoreObserverMock() {} | 17 virtual ~PrefStoreObserverMock(); |
18 | 18 |
19 MOCK_METHOD1(OnPrefValueChanged, void(const std::string&)); | 19 MOCK_METHOD1(OnPrefValueChanged, void(const std::string&)); |
20 MOCK_METHOD0(OnInitializationCompleted, void()); | 20 MOCK_METHOD0(OnInitializationCompleted, void()); |
21 | 21 |
22 private: | 22 private: |
23 DISALLOW_COPY_AND_ASSIGN(PrefStoreObserverMock); | 23 DISALLOW_COPY_AND_ASSIGN(PrefStoreObserverMock); |
24 }; | 24 }; |
25 | 25 |
26 #endif // CHROME_COMMON_PREF_STORE_OBSERVER_MOCK_H_ | 26 #endif // CHROME_COMMON_PREF_STORE_OBSERVER_MOCK_H_ |
OLD | NEW |