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

Unified Diff: blimp/net/test_common.h

Issue 1429193002: Add interfaces for most major Blimp net components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address wez's feedback. Created 5 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
Index: blimp/net/test_common.h
diff --git a/blimp/net/test_common.h b/blimp/net/test_common.h
index 212715a8c8ebc00b0cd7ff9168e339335199a77b..4f027f85992c87a700dbe21d15365b6901701e8b 100644
--- a/blimp/net/test_common.h
+++ b/blimp/net/test_common.h
@@ -7,6 +7,7 @@
#include <string>
+#include "blimp/net/blimp_message_processor.h"
#include "net/socket/stream_socket.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -70,6 +71,17 @@ class MockStreamSocket : public net::StreamSocket {
MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t());
};
+class MockBlimpMessageProcessor : public BlimpMessageProcessor {
+ public:
+ MockBlimpMessageProcessor();
+
+ ~MockBlimpMessageProcessor() override;
+
+ MOCK_METHOD2(ProcessMessage,
+ void(const BlimpMessage& message,
+ const net::CompletionCallback& callback));
+};
+
// Returns true if |buf| has a prefix of |str|.
// Behavior is undefined if len(buf) < len(str).
bool BufferStartsWith(net::GrowableIOBuffer* buf, const std::string& str);

Powered by Google App Engine
This is Rietveld 408576698