#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/media/router/test/media_router_mojo_test.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/run_loop.h"
_;
ByRef;
Invoke;
NiceMock;
Not;
Pointee;
WithArg;
namespace media_router {
namespace {
const char kDescription[] = …;
const char kMessage[] = …;
const char kOrigin[] = …;
const char kPresentationId[] = …;
const char kRouteId[] = …;
const char kSource[] = …;
const char kSinkId[] = …;
const int kInvalidFrameTreeNodeId = …;
const int kTimeoutMillis = …;
const uint8_t kBinaryMessage[] = …;
MATCHER_P(Equals, value, "") { … }
MediaRoute CreateMediaRoute() { … }
class SendMessageCallbackHandler { … };
class SinkResponseCallbackHandler { … };
}
MockMediaRouteProvider::MockMediaRouteProvider() { … }
MockMediaRouteProvider::~MockMediaRouteProvider() { … }
void MockMediaRouteProvider::RouteRequestSuccess(RouteCallback& cb) const { … }
void MockMediaRouteProvider::RouteRequestTimeout(RouteCallback& cb) const { … }
void MockMediaRouteProvider::TerminateRouteSuccess(
TerminateRouteCallback& cb) const { … }
void MockMediaRouteProvider::BindMediaControllerSuccess(
BindMediaControllerCallback& cb) const { … }
void MockMediaRouteProvider::SetRouteToReturn(const MediaRoute& route) { … }
MockMediaStatusObserver::MockMediaStatusObserver(
mojo::PendingReceiver<mojom::MediaStatusObserver> receiver)
: … { … }
MockMediaStatusObserver::~MockMediaStatusObserver() { … }
MockMediaController::MockMediaController() = default;
MockMediaController::~MockMediaController() = default;
void MockMediaController::Bind(
mojo::PendingReceiver<mojom::MediaController> receiver) { … }
mojo::PendingRemote<mojom::MediaController>
MockMediaController::BindInterfaceRemote() { … }
void MockMediaController::CloseReceiver() { … }
MediaRouterMojoTest::MediaRouterMojoTest() = default;
MediaRouterMojoTest::~MediaRouterMojoTest() = default;
void MediaRouterMojoTest::RegisterCastProvider() { … }
void MediaRouterMojoTest::RegisterWiredDisplayProvider() { … }
void MediaRouterMojoTest::SetUp() { … }
void MediaRouterMojoTest::TearDown() { … }
void MediaRouterMojoTest::ProvideTestRoute(
mojom::MediaRouteProviderId provider_id,
const MediaRoute::Id& route_id) { … }
void MediaRouterMojoTest::ProvideTestSink(
mojom::MediaRouteProviderId provider_id,
const MediaSink::Id& sink_id) { … }
void MediaRouterMojoTest::TestCreateRoute() { … }
void MediaRouterMojoTest::TestJoinRoute(const std::string& presentation_id) { … }
void MediaRouterMojoTest::TestTerminateRoute() { … }
void MediaRouterMojoTest::TestSendRouteMessage() { … }
void MediaRouterMojoTest::TestSendRouteBinaryMessage() { … }
void MediaRouterMojoTest::TestDetachRoute() { … }
void MediaRouterMojoTest::RegisterMediaRouteProvider(
mojom::MediaRouteProvider* provider,
mojom::MediaRouteProviderId provider_id) { … }
RouteResponseCallbackHandler::RouteResponseCallbackHandler() = default;
RouteResponseCallbackHandler::~RouteResponseCallbackHandler() = default;
void RouteResponseCallbackHandler::Invoke(
mojom::RoutePresentationConnectionPtr connection,
const RouteRequestResult& result) { … }
}