| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/common/extensions/message_bundle.h" | 9 #include "chrome/common/extensions/message_bundle.h" |
| 10 #include "chrome/renderer/extensions/extension_localization_peer.h" | 10 #include "chrome/renderer/extensions/extension_localization_peer.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual ~MockResourceLoaderBridgePeer() {} | 57 virtual ~MockResourceLoaderBridgePeer() {} |
| 58 | 58 |
| 59 MOCK_METHOD2(OnUploadProgress, void(uint64 position, uint64 size)); | 59 MOCK_METHOD2(OnUploadProgress, void(uint64 position, uint64 size)); |
| 60 MOCK_METHOD4(OnReceivedRedirect, bool( | 60 MOCK_METHOD4(OnReceivedRedirect, bool( |
| 61 const GURL& new_url, | 61 const GURL& new_url, |
| 62 const webkit_glue::ResourceResponseInfo& info, | 62 const webkit_glue::ResourceResponseInfo& info, |
| 63 bool* has_new_first_party_for_cookies, | 63 bool* has_new_first_party_for_cookies, |
| 64 GURL* new_first_party_for_cookies)); | 64 GURL* new_first_party_for_cookies)); |
| 65 MOCK_METHOD1(OnReceivedResponse, void( | 65 MOCK_METHOD1(OnReceivedResponse, void( |
| 66 const webkit_glue::ResourceResponseInfo& info)); | 66 const webkit_glue::ResourceResponseInfo& info)); |
| 67 MOCK_METHOD1(OnDownloadedData, void(int len)); | 67 MOCK_METHOD2(OnDownloadedData, void(int len, int encoded_data_length)); |
| 68 MOCK_METHOD3(OnReceivedData, void(const char* data, | 68 MOCK_METHOD3(OnReceivedData, void(const char* data, |
| 69 int data_length, | 69 int data_length, |
| 70 int encoded_data_length)); | 70 int encoded_data_length)); |
| 71 MOCK_METHOD4(OnCompletedRequest, void( | 71 MOCK_METHOD4(OnCompletedRequest, void( |
| 72 int error_code, | 72 int error_code, |
| 73 bool was_ignored_by_handler, | 73 bool was_ignored_by_handler, |
| 74 const std::string& security_info, | 74 const std::string& security_info, |
| 75 const base::TimeTicks& completion_time)); | 75 const base::TimeTicks& completion_time)); |
| 76 | 76 |
| 77 private: | 77 private: |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 EXPECT_CALL(*original_peer_, | 241 EXPECT_CALL(*original_peer_, |
| 242 OnReceivedData(StrEq(message.data()), message.length(), -1)); | 242 OnReceivedData(StrEq(message.data()), message.length(), -1)); |
| 243 | 243 |
| 244 EXPECT_CALL(*original_peer_, OnReceivedResponse(_)); | 244 EXPECT_CALL(*original_peer_, OnReceivedResponse(_)); |
| 245 EXPECT_CALL(*original_peer_, OnCompletedRequest( | 245 EXPECT_CALL(*original_peer_, OnCompletedRequest( |
| 246 net::OK, false, "", base::TimeTicks())); | 246 net::OK, false, "", base::TimeTicks())); |
| 247 | 247 |
| 248 filter_peer->OnCompletedRequest( | 248 filter_peer->OnCompletedRequest( |
| 249 net::OK, false, std::string(), base::TimeTicks()); | 249 net::OK, false, std::string(), base::TimeTicks()); |
| 250 } | 250 } |
| OLD | NEW |