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

Unified Diff: remoting/protocol/message_decoder_unittest.cc

Issue 6277003: Simplified MessageReader and MessageDecoder classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/message_decoder.cc ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/message_decoder_unittest.cc
diff --git a/remoting/protocol/message_decoder_unittest.cc b/remoting/protocol/message_decoder_unittest.cc
index f2ecfcc2f4e2007bc65ab294566a0c4b8986bf1e..81bb6992a42c741c274c066eee04b4b228b1cf4f 100644
--- a/remoting/protocol/message_decoder_unittest.cc
+++ b/remoting/protocol/message_decoder_unittest.cc
@@ -69,7 +69,17 @@ void SimulateReadSequence(const int read_sequence[], int sequence_size) {
// And then prepare an IOBuffer for feeding it.
scoped_refptr<net::IOBuffer> buffer(new net::IOBuffer(read));
memcpy(buffer->data(), test_data + i, read);
- decoder.ParseMessages(buffer, read, &message_list);
+ decoder.AddData(buffer, read);
+ while (true) {
+ CompoundBuffer message;
+ if (!decoder.GetNextMessage(&message))
+ break;
+
+ EventMessage* event = new EventMessage();
+ CompoundBufferInputStream stream(&message);
+ ASSERT_TRUE(event->ParseFromZeroCopyStream(&stream));
+ message_list.push_back(event);
+ }
i += read;
}
« no previous file with comments | « remoting/protocol/message_decoder.cc ('k') | remoting/protocol/message_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698