#include "services/video_capture/broadcasting_receiver.h"
#include "base/memory/unsafe_shared_memory_region.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/video_capture/public/cpp/mock_video_frame_handler.h"
#include "services/video_capture/public/mojom/video_frame_handler.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
InvokeWithoutArgs;
namespace video_capture {
static const size_t kArbitraryDummyBufferSize = …;
static const int kArbitraryBufferId = …;
static const int kArbitraryFrameFeedbackId = …;
class StubReadWritePermission final
: public media::VideoCaptureDevice::Client::Buffer::ScopedAccessPermission { … };
class BroadcastingReceiverTest : public ::testing::Test { … };
TEST_F(
BroadcastingReceiverTest,
HoldsOnToAccessPermissionForRetiredBufferUntilLastClientFinishedConsuming) { … }
TEST_F(BroadcastingReceiverTest,
DoesNotHoldOnToAccessPermissionWhenAllClientsAreSuspended) { … }
TEST_F(BroadcastingReceiverTest, AccessPermissionsSurviveStop) { … }
}