| 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 #include <atlbase.h> | 5 #include <atlbase.h> |
| 6 #include <atlcom.h> | 6 #include <atlcom.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "chrome/common/automation_messages.h" | 10 #include "chrome/common/automation_messages.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 class MockUrlDelegate : public PluginUrlRequestDelegate { | 39 class MockUrlDelegate : public PluginUrlRequestDelegate { |
| 40 public: | 40 public: |
| 41 MOCK_METHOD9(OnResponseStarted, void(int request_id, const char* mime_type, | 41 MOCK_METHOD9(OnResponseStarted, void(int request_id, const char* mime_type, |
| 42 const char* headers, int size, base::Time last_modified, | 42 const char* headers, int size, base::Time last_modified, |
| 43 const std::string& redirect_url, int redirect_status, | 43 const std::string& redirect_url, int redirect_status, |
| 44 const net::HostPortPair& socket_address, uint64 upload_size)); | 44 const net::HostPortPair& socket_address, uint64 upload_size)); |
| 45 MOCK_METHOD2(OnReadComplete, void(int request_id, const std::string& data)); | 45 MOCK_METHOD2(OnReadComplete, void(int request_id, const std::string& data)); |
| 46 MOCK_METHOD2(OnResponseEnd, void(int request_id, | 46 MOCK_METHOD2(OnResponseEnd, void(int request_id, |
| 47 const net::URLRequestStatus& status)); | 47 const net::URLRequestStatus& status)); |
| 48 MOCK_METHOD4(OnCookiesRetrieved, void(bool success, const GURL& url, | |
| 49 const std::string& cookie, int cookie_id)); | |
| 50 | 48 |
| 51 void PostponeReadRequest(chrome_frame_test::TimedMsgLoop* loop, | 49 void PostponeReadRequest(chrome_frame_test::TimedMsgLoop* loop, |
| 52 UrlmonUrlRequest* request, int bytes_to_read) { | 50 UrlmonUrlRequest* request, int bytes_to_read) { |
| 53 loop->PostTask(FROM_HERE, | 51 loop->PostTask(FROM_HERE, |
| 54 base::Bind(&MockUrlDelegate::RequestRead, | 52 base::Bind(&MockUrlDelegate::RequestRead, |
| 55 base::Unretained(this), request, bytes_to_read)); | 53 base::Unretained(this), request, bytes_to_read)); |
| 56 } | 54 } |
| 57 | 55 |
| 58 private: | 56 private: |
| 59 void RequestRead(UrlmonUrlRequest* request, int bytes_to_read) { | 57 void RequestRead(UrlmonUrlRequest* request, int bytes_to_read) { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 EXPECT_CALL(mock, OnReadComplete(1, testing::_)) | 312 EXPECT_CALL(mock, OnReadComplete(1, testing::_)) |
| 315 .Times(0); | 313 .Times(0); |
| 316 | 314 |
| 317 EXPECT_CALL(mock, OnResponseEnd(1, testing::_)) | 315 EXPECT_CALL(mock, OnResponseEnd(1, testing::_)) |
| 318 .Times(0); | 316 .Times(0); |
| 319 | 317 |
| 320 mgr->StartUrlRequest(1, r1); | 318 mgr->StartUrlRequest(1, r1); |
| 321 loop.RunFor(kChromeFrameLongNavigationTimeout); | 319 loop.RunFor(kChromeFrameLongNavigationTimeout); |
| 322 mgr.reset(); | 320 mgr.reset(); |
| 323 } | 321 } |
| OLD | NEW |