#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/media/webrtc/webrtc_rtp_dump_handler.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string_view>
#include <utility>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "chrome/browser/media/webrtc/webrtc_rtp_dump_writer.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
class FakeDumpWriter : public WebRtcRtpDumpWriter { … };
class WebRtcRtpDumpHandlerTest : public testing::Test { … };
TEST_F(WebRtcRtpDumpHandlerTest, StateTransition) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StoppedWhenMaxSizeReached) { … }
TEST_F(WebRtcRtpDumpHandlerTest, PacketIgnoredIfDumpingNotStarted) { … }
TEST_F(WebRtcRtpDumpHandlerTest, PacketIgnoredIfDumpingStopped) { … }
TEST_F(WebRtcRtpDumpHandlerTest, CannotStartMoreThanFiveDumps) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StartStopIncomingThenStartStopOutgoing) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StartIncomingStartOutgoingThenStopBoth) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StartBothThenStopIncomingStopOutgoing) { … }
TEST_F(WebRtcRtpDumpHandlerTest, DumpsCleanedUpIfNotReleased) { … }
TEST_F(WebRtcRtpDumpHandlerTest, DumpDeletedIfEndDumpFailed) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StopOngoingDumpsWhileStoppingDumps) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StopOngoingDumpsWhileDumping) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StopOngoingDumpsWhenAlreadyStopped) { … }
TEST_F(WebRtcRtpDumpHandlerTest, StopOngoingDumpsWhileStoppingOneDump) { … }
TEST_F(WebRtcRtpDumpHandlerTest, DeleteHandlerBeforeStopCallback) { … }