#include "remoting/protocol/webrtc_transport.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/threading/platform_thread.h"
#include "base/threading/watchdog.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/webrtc/thread_wrapper.h"
#include "net/base/io_buffer.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/compound_buffer.h"
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/fake_authenticator.h"
#include "remoting/protocol/message_channel_factory.h"
#include "remoting/protocol/message_pipe.h"
#include "remoting/protocol/message_serialization.h"
#include "remoting/protocol/network_settings.h"
#include "remoting/protocol/transport_context.h"
#include "remoting/protocol/webrtc_video_encoder_factory.h"
#include "remoting/signaling/fake_signal_strategy.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/libjingle_xmpp/xmllite/xmlelement.h"
namespace remoting::protocol {
namespace {
const char kChannelName[] = …;
const char kAuthKey[] = …;
class TestTransportEventHandler : public WebrtcTransport::EventHandler { … };
class TestMessagePipeEventHandler : public MessagePipe::EventHandler { … };
}
class WebrtcTransportTest : public testing::Test { … };
#if BUILDFLAG(IS_MAC)
#define MAYBE_Connects …
#else
#define MAYBE_Connects …
#endif
TEST_F(WebrtcTransportTest, MAYBE_Connects) { … }
TEST_F(WebrtcTransportTest, InvalidAuthKey) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_DataStream …
#else
#define MAYBE_DataStream …
#endif
TEST_F(WebrtcTransportTest, MAYBE_DataStream) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_DataStreamLate …
#else
#define MAYBE_DataStreamLate …
#endif
TEST_F(WebrtcTransportTest, MAYBE_DataStreamLate) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_TerminateDataChannel …
#else
#define MAYBE_TerminateDataChannel …
#endif
TEST_F(WebrtcTransportTest, MAYBE_TerminateDataChannel) { … }
}