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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, | 60 MOCK_METHOD2(OnSetCookieAsync, void(const GURL& url, |
61 const std::string& cookie)); | 61 const std::string& cookie)); |
62 | 62 |
63 // Use for sending network responses | 63 // Use for sending network responses |
64 void SetRequestDelegate(PluginUrlRequestDelegate* request_delegate) { | 64 void SetRequestDelegate(PluginUrlRequestDelegate* request_delegate) { |
65 request_delegate_ = request_delegate; | 65 request_delegate_ = request_delegate; |
66 } | 66 } |
67 | 67 |
68 void ReplyStarted(int request_id, const char* headers) { | 68 void ReplyStarted(int request_id, const char* headers) { |
69 request_delegate_->OnResponseStarted(request_id, "text/html", headers, | 69 request_delegate_->OnResponseStarted(request_id, "text/html", headers, |
70 0, base::Time::Now(), EmptyString(), 0, net::HostPortPair(), 0); | 70 0, base::Time::Now(), std::string(), 0, net::HostPortPair(), 0); |
71 } | 71 } |
72 | 72 |
73 void ReplyData(int request_id, const std::string* data) { | 73 void ReplyData(int request_id, const std::string* data) { |
74 request_delegate_->OnReadComplete(request_id, *data); | 74 request_delegate_->OnReadComplete(request_id, *data); |
75 } | 75 } |
76 | 76 |
77 void Reply(const net::URLRequestStatus& status, int request_id) { | 77 void Reply(const net::URLRequestStatus& status, int request_id) { |
78 request_delegate_->OnResponseEnd(request_id, status); | 78 request_delegate_->OnResponseEnd(request_id, status); |
79 } | 79 } |
80 | 80 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 virtual void SetUp() { | 179 virtual void SetUp() { |
180 dummy_sender_.ForwardTo(&mock_proxy_); | 180 dummy_sender_.ForwardTo(&mock_proxy_); |
181 tracker_.reset(new AutomationHandleTracker()); | 181 tracker_.reset(new AutomationHandleTracker()); |
182 | 182 |
183 client_ = new ChromeFrameAutomationClient; | 183 client_ = new ChromeFrameAutomationClient; |
184 client_->set_proxy_factory(&factory_); | 184 client_->set_proxy_factory(&factory_); |
185 } | 185 } |
186 }; | 186 }; |
187 | 187 |
188 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ | 188 #endif // CHROME_FRAME_TEST_AUTOMATION_CLIENT_MOCK_H_ |
OLD | NEW |