#include "components/mirroring/service/media_remoter.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/default_tick_clock.h"
#include "components/mirroring/mojom/cast_message_channel.mojom.h"
#include "components/mirroring/mojom/session_parameters.mojom.h"
#include "components/mirroring/service/mirror_settings.h"
#include "components/mirroring/service/rpc_dispatcher.h"
#include "components/openscreen_platform/task_runner.h"
#include "media/base/audio_codecs.h"
#include "media/base/video_codecs.h"
#include "media/cast/cast_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/openscreen/src/cast/streaming/environment.h"
#include "third_party/openscreen/src/cast/streaming/sender.h"
#include "third_party/openscreen/src/cast/streaming/sender_packet_router.h"
#include "third_party/openscreen/src/platform/api/time.h"
#include "third_party/openscreen/src/platform/base/trivial_clock_traits.h"
RtpPayloadType;
RemotingSinkMetadata;
RemotingStopReason;
SessionType;
_;
InvokeWithoutArgs;
Mock;
namespace mirroring {
namespace {
constexpr uint32_t kFirstSsrc = …;
constexpr int kRtpTimebase = …;
constexpr std::array<uint8_t, 16> kAesSecretKey{ … };
constexpr std::array<uint8_t, 16> kAesIvMask{ … };
constexpr auto kDefaultPlayoutDelay = …;
struct OpenscreenTestSenders { … };
struct DataStreamHandles { … };
class MockRemotingSource : public media::mojom::RemotingSource { … };
class MockRpcDispatcher : public RpcDispatcher { … };
RemotingSinkMetadata DefaultSinkMetadata() { … }
}
class MediaRemoterTest : public mojom::CastMessageChannel,
public MediaRemoter::Client,
public ::testing::Test { … };
TEST_F(MediaRemoterTest, StartAndStopRemoting) { … }
TEST_F(MediaRemoterTest, StartAndStopRemotingAudioOnly) { … }
TEST_F(MediaRemoterTest, StartAndStopRemotingVideoOnly) { … }
TEST_F(MediaRemoterTest, StartRemotingWithoutCallingStart) { … }
TEST_F(MediaRemoterTest, StopRemotingWhileStarting) { … }
TEST_F(MediaRemoterTest, RemotingStartFailed) { … }
TEST_F(MediaRemoterTest, SwitchBetweenMultipleSessions) { … }
}