#include "remoting/protocol/client_video_dispatcher.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "remoting/base/buffered_socket_writer.h"
#include "remoting/base/constants.h"
#include "remoting/proto/video.pb.h"
#include "remoting/protocol/fake_stream_socket.h"
#include "remoting/protocol/message_reader.h"
#include "remoting/protocol/message_serialization.h"
#include "remoting/protocol/protocol_mock_objects.h"
#include "remoting/protocol/stream_message_pipe_adapter.h"
#include "remoting/protocol/video_stub.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting::protocol {
class ClientVideoDispatcherTest : public testing::Test,
public VideoStub,
public ChannelDispatcherBase::EventHandler { … };
ClientVideoDispatcherTest::ClientVideoDispatcherTest()
: … { … }
void ClientVideoDispatcherTest::ProcessVideoPacket(
std::unique_ptr<VideoPacket> video_packet,
base::OnceClosure done) { … }
void ClientVideoDispatcherTest::OnChannelInitialized(
ChannelDispatcherBase* channel_dispatcher) { … }
void ClientVideoDispatcherTest::OnChannelClosed(
ChannelDispatcherBase* channel_dispatcher) { … }
void ClientVideoDispatcherTest::OnChannelError(int error) { … }
void ClientVideoDispatcherTest::OnMessageReceived(
std::unique_ptr<CompoundBuffer> buffer) { … }
void ClientVideoDispatcherTest::OnReadError(int error) { … }
TEST_F(ClientVideoDispatcherTest, WithoutAcks) { … }
TEST_F(ClientVideoDispatcherTest, WithAcks) { … }
TEST_F(ClientVideoDispatcherTest, VideoLayout) { … }
TEST_F(ClientVideoDispatcherTest, AcksOrder) { … }
}