Audio indicator in each tab
[chromium-blink-merge.git] / chrome_frame / test / proxy_factory_mock.h
blob609d4b681b39036c3f23ca6ebbe4457f11f42d75
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_
7 #include <windows.h>
8 #include <string>
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 {
20 public:
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") {
29 thread_.Start();
30 loop_ = thread_.message_loop();
33 // Fake implementation
34 void GetServerImpl(ChromeFrameAutomationProxy* pxy,
35 void* proxy_id,
36 AutomationLaunchResult result,
37 LaunchDelegate* d,
38 ChromeFrameLaunchParams* params,
39 void** automation_server_id);
41 base::Thread thread_;
42 MessageLoop* loop_;
46 #endif // CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_