| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 virtual ~MockIpcMessageSender() {} | 45 virtual ~MockIpcMessageSender() {} |
| 46 | 46 |
| 47 MOCK_METHOD1(Send, bool(IPC::Message* message)); | 47 MOCK_METHOD1(Send, bool(IPC::Message* message)); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(MockIpcMessageSender); | 50 DISALLOW_COPY_AND_ASSIGN(MockIpcMessageSender); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 class MockResourceLoaderBridgePeer | 53 class MockResourceLoaderBridgePeer : public content::RequestDelegatePeer { |
| 54 : public webkit_glue::ResourceLoaderBridge::Peer { | |
| 55 public: | 54 public: |
| 56 MockResourceLoaderBridgePeer() {} | 55 MockResourceLoaderBridgePeer() {} |
| 57 virtual ~MockResourceLoaderBridgePeer() {} | 56 virtual ~MockResourceLoaderBridgePeer() {} |
| 58 | 57 |
| 59 MOCK_METHOD2(OnUploadProgress, void(uint64 position, uint64 size)); | 58 MOCK_METHOD2(OnUploadProgress, void(uint64 position, uint64 size)); |
| 60 MOCK_METHOD4(OnReceivedRedirect, bool( | 59 MOCK_METHOD4(OnReceivedRedirect, bool( |
| 61 const GURL& new_url, | 60 const GURL& new_url, |
| 62 const webkit_glue::ResourceResponseInfo& info, | 61 const webkit_glue::ResourceResponseInfo& info, |
| 63 bool* has_new_first_party_for_cookies, | 62 bool* has_new_first_party_for_cookies, |
| 64 GURL* new_first_party_for_cookies)); | 63 GURL* new_first_party_for_cookies)); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 EXPECT_CALL(*original_peer_, | 242 EXPECT_CALL(*original_peer_, |
| 244 OnReceivedData(StrEq(message.data()), message.length(), -1)); | 243 OnReceivedData(StrEq(message.data()), message.length(), -1)); |
| 245 | 244 |
| 246 EXPECT_CALL(*original_peer_, OnReceivedResponse(_)); | 245 EXPECT_CALL(*original_peer_, OnReceivedResponse(_)); |
| 247 EXPECT_CALL(*original_peer_, OnCompletedRequest( | 246 EXPECT_CALL(*original_peer_, OnCompletedRequest( |
| 248 net::OK, false, false, "", base::TimeTicks(), -1)); | 247 net::OK, false, false, "", base::TimeTicks(), -1)); |
| 249 | 248 |
| 250 filter_peer->OnCompletedRequest( | 249 filter_peer->OnCompletedRequest( |
| 251 net::OK, false, false, std::string(), base::TimeTicks(), -1); | 250 net::OK, false, false, std::string(), base::TimeTicks(), -1); |
| 252 } | 251 } |
| OLD | NEW |