OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 const std::string& message, | 50 const std::string& message, |
51 const std::string& origin, | 51 const std::string& origin, |
52 const std::string& target)); | 52 const std::string& target)); |
53 MOCK_METHOD3(OnHandleContextMenu, void(HANDLE menu_handle, | 53 MOCK_METHOD3(OnHandleContextMenu, void(HANDLE menu_handle, |
54 int align_flags, const MiniContextMenuParams& params)); | 54 int align_flags, const MiniContextMenuParams& params)); |
55 MOCK_METHOD2(OnRequestStart, void(int request_id, | 55 MOCK_METHOD2(OnRequestStart, void(int request_id, |
56 const AutomationURLRequest& request)); | 56 const AutomationURLRequest& request)); |
57 MOCK_METHOD2(OnRequestRead, void(int request_id, int bytes_to_read)); | 57 MOCK_METHOD2(OnRequestRead, void(int request_id, int bytes_to_read)); |
58 MOCK_METHOD2(OnRequestEnd, void(int request_id, | 58 MOCK_METHOD2(OnRequestEnd, void(int request_id, |
59 const net::URLRequestStatus& status)); | 59 const net::URLRequestStatus& status)); |
60 MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, | |
61 const std::string& cookie)); | |
62 | 60 |
63 // Use for sending network responses | 61 // Use for sending network responses |
64 void SetRequestDelegate(PluginUrlRequestDelegate* request_delegate) { | 62 void SetRequestDelegate(PluginUrlRequestDelegate* request_delegate) { |
65 request_delegate_ = request_delegate; | 63 request_delegate_ = request_delegate; |
66 } | 64 } |
67 | 65 |
68 void ReplyStarted(int request_id, const char* headers) { | 66 void ReplyStarted(int request_id, const char* headers) { |
69 request_delegate_->OnResponseStarted(request_id, "text/html", headers, | 67 request_delegate_->OnResponseStarted(request_id, "text/html", headers, |
70 0, base::Time::Now(), std::string(), 0, net::HostPortPair(), 0); | 68 0, base::Time::Now(), std::string(), 0, net::HostPortPair(), 0); |
71 } | 69 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 virtual void SetUp() { | 177 virtual void SetUp() { |
180 dummy_sender_.ForwardTo(&mock_proxy_); | 178 dummy_sender_.ForwardTo(&mock_proxy_); |
181 tracker_.reset(new AutomationHandleTracker()); | 179 tracker_.reset(new AutomationHandleTracker()); |
182 | 180 |
183 client_ = new ChromeFrameAutomationClient; | 181 client_ = new ChromeFrameAutomationClient; |
184 client_->set_proxy_factory(&factory_); | 182 client_->set_proxy_factory(&factory_); |
185 } | 183 } |
186 }; | 184 }; |
187 | 185 |
188 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 186 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
OLD | NEW |