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

Unified Diff: blimp/net/test_common.cc

Issue 2462183002: GRPC Stream implementation of HeliumStream
Patch Set: Address gcasto comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/net/test_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/test_common.cc
diff --git a/blimp/net/test_common.cc b/blimp/net/test_common.cc
index da3d8c6779382064bc8a8f5bd534fa1e00e13fff..42de45c35da4e747c46b2c832fc7d573f6e5b040 100644
--- a/blimp/net/test_common.cc
+++ b/blimp/net/test_common.cc
@@ -70,9 +70,18 @@ MockBlimpMessageProcessor::~MockBlimpMessageProcessor() {}
void MockBlimpMessageProcessor::ProcessMessage(
std::unique_ptr<BlimpMessage> message,
const net::CompletionCallback& callback) {
+ if (!test_callback_.is_null()) {
+ test_callback_.Run(net::OK);
+ }
+ received_msg = *message;
MockableProcessMessage(*message, callback);
}
+void MockBlimpMessageProcessor::SetTestCompletionCallback(
+ const net::CompletionCallback& callback) {
+ test_callback_ = callback;
+}
+
std::string EncodeHeader(size_t size) {
std::unique_ptr<char[]> serialized(new char[kPacketHeaderSizeBytes]);
uint32_t net_size = base::HostToNet32(size);
« no previous file with comments | « blimp/net/test_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698