| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PROTECTOR_MOCK_PROTECTOR_SERVICE_H_ | |
| 6 #define CHROME_BROWSER_PROTECTOR_MOCK_PROTECTOR_SERVICE_H_ | |
| 7 | |
| 8 #include "chrome/browser/protector/protector_service.h" | |
| 9 #include "testing/gmock/include/gmock/gmock.h" | |
| 10 | |
| 11 namespace protector { | |
| 12 | |
| 13 class MockProtectorService : public ProtectorService { | |
| 14 public: | |
| 15 // Creates and returns the MockProtectorService instance associated with | |
| 16 // |profile|. Should be called before any calls to | |
| 17 // ProtectorServiceFactory::GetForProfile are made, otherwise a (non-mocked) | |
| 18 // ProtectorService instance will be associated with |profile|. | |
| 19 static MockProtectorService* BuildForProfile(Profile* profile); | |
| 20 | |
| 21 explicit MockProtectorService(Profile* profile); | |
| 22 virtual ~MockProtectorService(); | |
| 23 | |
| 24 MOCK_METHOD1(ShowChange, void(BaseSettingChange*)); | |
| 25 MOCK_CONST_METHOD0(IsShowingChange, bool()); | |
| 26 | |
| 27 MOCK_METHOD1(DismissChange, void(BaseSettingChange* change)); | |
| 28 MOCK_METHOD2(ApplyChange, void(BaseSettingChange* change, Browser*)); | |
| 29 MOCK_METHOD2(DiscardChange, void(BaseSettingChange* change, Browser*)); | |
| 30 | |
| 31 MOCK_METHOD2(OpenTab, void(const GURL&, Browser*)); | |
| 32 | |
| 33 MOCK_METHOD2(OnApplyChange, void(SettingsChangeGlobalError* error, Browser*)); | |
| 34 MOCK_METHOD2(OnDiscardChange, void(SettingsChangeGlobalError* error, | |
| 35 Browser*)); | |
| 36 MOCK_METHOD1(OnDecisionTimeout, void(SettingsChangeGlobalError* error)); | |
| 37 MOCK_METHOD1(OnRemovedFromProfile, void(SettingsChangeGlobalError* error)); | |
| 38 | |
| 39 MOCK_METHOD0(Shutdown, void()); | |
| 40 }; | |
| 41 | |
| 42 } // namespace protector | |
| 43 | |
| 44 #endif // CHROME_BROWSER_PROTECTOR_MOCK_PROTECTOR_SERVICE_H_ | |
| OLD | NEW |