#include <memory>
#include <numeric>
#include <utility>
#include "base/base64.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/message_loop/message_pump_type.h"
#include "base/rand_util.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/webrtc/thread_wrapper.h"
#include "net/base/network_change_notifier.h"
#include "net/test/test_data_directory.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/local_session_policies_provider.h"
#include "remoting/base/rsa_key_pair.h"
#include "remoting/client/audio/audio_player.h"
#include "remoting/client/chromoting_client.h"
#include "remoting/client/client_context.h"
#include "remoting/client/client_user_interface.h"
#include "remoting/client/software_video_renderer.h"
#include "remoting/host/chromoting_host.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/fake_desktop_environment.h"
#include "remoting/protocol/auth_util.h"
#include "remoting/protocol/client_authentication_config.h"
#include "remoting/protocol/frame_consumer.h"
#include "remoting/protocol/frame_stats.h"
#include "remoting/protocol/host_authentication_config.h"
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/me2me_host_authenticator_factory.h"
#include "remoting/protocol/session_config.h"
#include "remoting/protocol/transport_context.h"
#include "remoting/protocol/video_frame_pump.h"
#include "remoting/protocol/video_renderer.h"
#include "remoting/signaling/fake_signal_strategy.h"
#include "remoting/test/cyclic_frame_generator.h"
#include "remoting/test/fake_network_dispatcher.h"
#include "remoting/test/fake_port_allocator.h"
#include "remoting/test/fake_socket_factory.h"
#include "remoting/test/scroll_frame_generator.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
TaskEnvironment;
ChannelConfig;
namespace {
const char kHostJid[] = …;
const char kHostOwner[] = …;
const char kClientJid[] = …;
const char kHostId[] = …;
const char kHostPin[] = …;
struct NetworkPerformanceParams { … };
class FakeCursorShapeStub : public protocol::CursorShapeStub { … };
}
class ProtocolPerfTest
: public testing::Test,
public testing::WithParamInterface<NetworkPerformanceParams>,
public ClientUserInterface,
public protocol::FrameConsumer,
public protocol::FrameStatsConsumer,
public HostStatusObserver { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
void ProtocolPerfTest::MeasureTotalLatency(bool use_webrtc) { … }
TEST_P(ProtocolPerfTest, TotalLatencyIce) { … }
TEST_P(ProtocolPerfTest, TotalLatencyWebrtc) { … }
void ProtocolPerfTest::MeasureScrollPerformance(bool use_webrtc) { … }
TEST_P(ProtocolPerfTest, ScrollPerformanceIce) { … }
TEST_P(ProtocolPerfTest, ScrollPerformanceWebrtc) { … }
}