#include <memory>
#include <string>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/task_environment.h"
#include "net/base/net_errors.h"
#include "net/socket/socket.h"
#include "remoting/protocol/fake_stream_socket.h"
#include "remoting/protocol/message_reader.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/rtc_base/byte_order.h"
_;
DoAll;
Mock;
SaveArg;
namespace remoting::protocol {
namespace {
const char kTestMessage1[] = …;
const char kTestMessage2[] = …;
}
class MockMessageReceivedCallback { … };
class MessageReaderTest : public testing::Test { … };
TEST_F(MessageReaderTest, OneMessage) { … }
TEST_F(MessageReaderTest, TwoMessages_Together) { … }
TEST_F(MessageReaderTest, TwoMessages_Separately) { … }
TEST_F(MessageReaderTest, ReadError) { … }
TEST_F(MessageReaderTest, EndOfStream) { … }
TEST_F(MessageReaderTest, ReadFromCallback) { … }
TEST_F(MessageReaderTest, DeleteFromCallback) { … }
}