1 // Copyright (c) 2006-2010 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 #ifndef CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_
5 #define CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_
10 #include "gmock/gmock.h"
11 #include "chrome_frame/chrome_frame_automation.h"
13 struct LaunchDelegateMock
: public LaunchDelegate
{
14 MOCK_METHOD2(LaunchComplete
, void(ChromeFrameAutomationProxy
*,
15 AutomationLaunchResult
));
16 MOCK_METHOD0(AutomationServerDied
, void());
19 class MockProxyFactory
: public ProxyFactory
{
21 MOCK_METHOD3(GetAutomationServer
,
22 void (LaunchDelegate
*, // NOLINT
23 ChromeFrameLaunchParams
* params
,
24 void** automation_server_id
));
25 MOCK_METHOD2(ReleaseAutomationServer
, bool(void* server_id
,
26 LaunchDelegate
* delegate
));
28 MockProxyFactory() : thread_("mock factory worker") {
30 loop_
= thread_
.message_loop();
33 // Fake implementation
34 void GetServerImpl(ChromeFrameAutomationProxy
* pxy
,
36 AutomationLaunchResult result
,
38 ChromeFrameLaunchParams
* params
,
39 void** automation_server_id
);
46 #endif // CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_