Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/common/extensions/extension_localization_peer_unittest.cc

Issue 3053009: Pepper stream-to-file plumbing.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension_localization_peer.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "chrome/common/extensions/extension_message_bundle.h" 9 #include "chrome/common/extensions/extension_message_bundle.h"
10 #include "chrome/common/extensions/extension_localization_peer.h" 10 #include "chrome/common/extensions/extension_localization_peer.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 MOCK_METHOD2(OnUploadProgress, void(uint64 position, uint64 size)); 60 MOCK_METHOD2(OnUploadProgress, void(uint64 position, uint64 size));
61 MOCK_METHOD4(OnReceivedRedirect, bool( 61 MOCK_METHOD4(OnReceivedRedirect, bool(
62 const GURL& new_url, 62 const GURL& new_url,
63 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, 63 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info,
64 bool* has_new_first_party_for_cookies, 64 bool* has_new_first_party_for_cookies,
65 GURL* new_first_party_for_cookies)); 65 GURL* new_first_party_for_cookies));
66 MOCK_METHOD2(OnReceivedResponse, void( 66 MOCK_METHOD2(OnReceivedResponse, void(
67 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, 67 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info,
68 bool content_filtered)); 68 bool content_filtered));
69 MOCK_METHOD1(OnDownloadedData, void(int len));
69 MOCK_METHOD2(OnReceivedData, void(const char* data, int len)); 70 MOCK_METHOD2(OnReceivedData, void(const char* data, int len));
70 MOCK_METHOD2(OnCompletedRequest, void( 71 MOCK_METHOD2(OnCompletedRequest, void(
71 const URLRequestStatus& status, const std::string& security_info)); 72 const URLRequestStatus& status, const std::string& security_info));
72 MOCK_CONST_METHOD0(GetURLForDebugging, GURL()); 73 MOCK_CONST_METHOD0(GetURLForDebugging, GURL());
73 74
74 private: 75 private:
75 DISALLOW_COPY_AND_ASSIGN(MockResourceLoaderBridgePeer); 76 DISALLOW_COPY_AND_ASSIGN(MockResourceLoaderBridgePeer);
76 }; 77 };
77 78
78 class ExtensionLocalizationPeerTest : public testing::Test { 79 class ExtensionLocalizationPeerTest : public testing::Test {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 OnReceivedData(StrEq(message.data()), message.length())); 247 OnReceivedData(StrEq(message.data()), message.length()));
247 248
248 EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true)); 249 EXPECT_CALL(*original_peer_, OnReceivedResponse(_, true));
249 EXPECT_CALL(*original_peer_, OnCompletedRequest( 250 EXPECT_CALL(*original_peer_, OnCompletedRequest(
250 IsURLRequestEqual(URLRequestStatus::SUCCESS), "")); 251 IsURLRequestEqual(URLRequestStatus::SUCCESS), ""));
251 252
252 URLRequestStatus status; 253 URLRequestStatus status;
253 status.set_status(URLRequestStatus::SUCCESS); 254 status.set_status(URLRequestStatus::SUCCESS);
254 filter_peer->OnCompletedRequest(status, ""); 255 filter_peer->OnCompletedRequest(status, "");
255 } 256 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_localization_peer.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698