#include "chrome/browser/media/router/discovery/mdns/cast_media_sink_service.h"
#include <inttypes.h>
#include <string>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_simple_task_runner.h"
#include "base/timer/mock_timer.h"
#include "chrome/browser/media/router/discovery/mdns/cast_media_sink_service_impl.h"
#include "chrome/browser/media/router/discovery/mdns/cast_media_sink_service_test_helpers.h"
#include "chrome/browser/media/router/discovery/mdns/media_sink_util.h"
#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/media/router/test/mock_dns_sd_registry.h"
#include "chrome/browser/media/router/test/provider_test_helpers.h"
#include "components/media_router/common/providers/cast/channel/cast_device_capability.h"
#include "components/media_router/common/providers/cast/channel/cast_socket.h"
#include "components/media_router/common/providers/cast/channel/cast_socket_service.h"
#include "components/media_router/common/providers/cast/channel/cast_test_util.h"
#include "components/media_router/common/test/test_helper.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/test/browser_task_environment.h"
#include "net/base/ip_address.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
CastDeviceCapability;
CastDeviceCapabilitySet;
_;
InvokeWithoutArgs;
NiceMock;
Return;
SaveArg;
namespace {
net::IPEndPoint CreateIPEndPoint(int num) { … }
media_router::DnsSdService CreateDnsService(
int num,
CastDeviceCapabilitySet capabilities) { … }
}
namespace media_router {
class CastMediaSinkServiceTest : public ::testing::Test { … };
TEST_F(CastMediaSinkServiceTest, DiscoverSinksNow) { … }
TEST_F(CastMediaSinkServiceTest, TestOnDnsSdEvent) { … }
TEST_F(CastMediaSinkServiceTest, DiscoveryDelayed) { … }
#if !BUILDFLAG(IS_WIN)
TEST_F(CastMediaSinkServiceTest, DiscoveryOnStartup) { … }
#endif
TEST_F(CastMediaSinkServiceTest, DiscoveryPermissionRejected) { … }
}