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