#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <memory>
#include <utility>
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "media/mojo/services/deferred_destroy_unique_receiver_set.h"
#include "mojo/public/interfaces/bindings/tests/ping_service.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
namespace {
using PingService = mojo::test::PingService;
class DeferredDestroyPingImpl : public DeferredDestroy<PingService> { … };
int DeferredDestroyPingImpl::instance_count = …;
DeferredDestroyPingImpl* AddDeferredDestroyReceiver(
DeferredDestroyUniqueReceiverSet<PingService>* receivers,
mojo::PendingRemote<PingService>* ptr) { … }
class DeferredDestroyUniqueReceiverSetTest : public testing::Test { … };
TEST_F(DeferredDestroyUniqueReceiverSetTest, Destructor) { … }
TEST_F(DeferredDestroyUniqueReceiverSetTest, ConnectionError) { … }
TEST_F(DeferredDestroyUniqueReceiverSetTest, CloseAllReceivers) { … }
}
}