#include "chrome/browser/ui/global_media_controls/cast_device_list_host.h"
#include "base/memory/raw_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/ui/media_router/cast_dialog_controller.h"
#include "chrome/browser/ui/media_router/cast_dialog_model.h"
#include "chrome/browser/ui/media_router/media_route_starter.h"
#include "chrome/browser/ui/media_router/ui_media_sink.h"
#include "components/global_media_controls/public/test/mock_device_service.h"
#include "components/global_media_controls/public/test/mock_media_dialog_delegate.h"
#include "content/public/test/browser_task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
CastDialogModel;
UIMediaSink;
UIMediaSinkState;
_;
NiceMock;
Return;
namespace mojom {
DeviceListClient;
}
namespace {
constexpr char kSinkId[] = …;
constexpr char16_t kSinkFriendlyName16[] = …;
UIMediaSink CreateMediaSink(
UIMediaSinkState state = UIMediaSinkState::AVAILABLE) { … }
CastDialogModel CreateModelWithSinks(std::vector<UIMediaSink> sinks) { … }
class MockCastDialogController : public media_router::CastDialogController { … };
}
class CastDeviceListHostTest : public testing::Test { … };
TEST_F(CastDeviceListHostTest, StartPresentation) { … }
TEST_F(CastDeviceListHostTest, NoopOnConnectingOrDisconnectingSink) { … }
TEST_F(CastDeviceListHostTest, StartRemotePlayback) { … }
#if !BUILDFLAG(IS_CHROMEOS)
TEST_F(CastDeviceListHostTest, StartAudioTabMirroring) { … }
#endif
TEST_F(CastDeviceListHostTest, OnSinksDiscovered) { … }
TEST_F(CastDeviceListHostTest, OnDiscoveryPermissionRejected) { … }
TEST_F(CastDeviceListHostTest, HideMediaDialogCallback) { … }
TEST_F(CastDeviceListHostTest, TerminateDialSession) { … }
TEST_F(CastDeviceListHostTest, SelectingDeviceClearsIssue) { … }
TEST_F(CastDeviceListHostTest, GetId) { … }