#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/protocol/channel_multiplexer.h"
#include <memory>
#include <utility>
#include "base/barrier_closure.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "net/base/completion_repeating_callback.h"
#include "net/base/net_errors.h"
#include "net/socket/socket.h"
#include "net/socket/stream_socket.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "remoting/base/constants.h"
#include "remoting/protocol/connection_tester.h"
#include "remoting/protocol/fake_stream_socket.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
AtMost;
InvokeWithoutArgs;
namespace remoting::protocol {
namespace {
const int kMessageSize = …;
const int kMessages = …;
const char kMuxChannelName[] = …;
const char kTestChannelName[] = …;
const char kTestChannelName2[] = …;
class MockConnectCallback { … };
}
class ChannelMultiplexerTest : public testing::Test { … };
TEST_F(ChannelMultiplexerTest, OneChannel) { … }
TEST_F(ChannelMultiplexerTest, TwoChannels) { … }
TEST_F(ChannelMultiplexerTest, FourChannels) { … }
TEST_F(ChannelMultiplexerTest, WriteFailSync) { … }
TEST_F(ChannelMultiplexerTest, WriteFailAsync) { … }
TEST_F(ChannelMultiplexerTest, DeleteWhenFailed) { … }
TEST_F(ChannelMultiplexerTest, SessionFail) { … }
}