| OLD | NEW |
| 1 // Copyright (c) 2011 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_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 5 #ifndef CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
| 6 #define CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 6 #define CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 MOCK_METHOD1(Send, bool(IPC::Message*)); | 89 MOCK_METHOD1(Send, bool(IPC::Message*)); |
| 90 MOCK_METHOD3(SendAsAsync, | 90 MOCK_METHOD3(SendAsAsync, |
| 91 void(IPC::SyncMessage* msg, | 91 void(IPC::SyncMessage* msg, |
| 92 SyncMessageReplyDispatcher::SyncMessageCallContext* context, | 92 SyncMessageReplyDispatcher::SyncMessageCallContext* context, |
| 93 void* key)); | 93 void* key)); |
| 94 MOCK_METHOD1(CancelAsync, void(void* key)); | 94 MOCK_METHOD1(CancelAsync, void(void* key)); |
| 95 MOCK_METHOD1(CreateTabProxy, scoped_refptr<TabProxy>(int handle)); | 95 MOCK_METHOD1(CreateTabProxy, scoped_refptr<TabProxy>(int handle)); |
| 96 MOCK_METHOD1(ReleaseTabProxy, void(AutomationHandle handle)); | 96 MOCK_METHOD1(ReleaseTabProxy, void(AutomationHandle handle)); |
| 97 MOCK_METHOD0(server_version, std::string(void)); | 97 MOCK_METHOD0(server_version, std::string(void)); |
| 98 MOCK_METHOD1(SendProxyConfig, void(const std::string&)); | 98 MOCK_METHOD1(SendProxyConfig, void(const std::string&)); |
| 99 MOCK_METHOD1(SetEnableExtensionAutomation, void(bool enable)); | |
| 100 | 99 |
| 101 ~MockAutomationProxy() {} | 100 ~MockAutomationProxy() {} |
| 102 }; | 101 }; |
| 103 | 102 |
| 104 struct MockAutomationMessageSender : public AutomationMessageSender { | 103 struct MockAutomationMessageSender : public AutomationMessageSender { |
| 105 virtual bool Send(IPC::Message* msg) { | 104 virtual bool Send(IPC::Message* msg) { |
| 106 return proxy_->Send(msg); | 105 return proxy_->Send(msg); |
| 107 } | 106 } |
| 108 | 107 |
| 109 void ForwardTo(StrictMock<MockAutomationProxy> *p) { | 108 void ForwardTo(StrictMock<MockAutomationProxy> *p) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 virtual void SetUp() { | 174 virtual void SetUp() { |
| 176 dummy_sender_.ForwardTo(&mock_proxy_); | 175 dummy_sender_.ForwardTo(&mock_proxy_); |
| 177 tracker_.reset(new AutomationHandleTracker()); | 176 tracker_.reset(new AutomationHandleTracker()); |
| 178 | 177 |
| 179 client_ = new ChromeFrameAutomationClient; | 178 client_ = new ChromeFrameAutomationClient; |
| 180 client_->set_proxy_factory(&factory_); | 179 client_->set_proxy_factory(&factory_); |
| 181 } | 180 } |
| 182 }; | 181 }; |
| 183 | 182 |
| 184 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 183 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
| OLD | NEW |