#include "chrome/browser/media/webrtc/webrtc_rtp_dump_writer.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <memory>
#include "base/containers/span_reader.h"
#include "base/containers/span_writer.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/numerics/byte_conversions.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zlib/zlib.h"
static const size_t kMinimumRtpHeaderLength = …;
static std::vector<uint8_t> CreateFakeRtpPacketHeader(
size_t csrc_count,
size_t extension_header_count) { … }
static void FlushTaskRunner(base::SequencedTaskRunner* task_runner) { … }
class WebRtcRtpDumpWriterTest : public testing::Test { … };
TEST_F(WebRtcRtpDumpWriterTest, NoDumpFileIfNoPacketDumped) { … }
TEST_F(WebRtcRtpDumpWriterTest, WriteAndFlushSmallSizeDump) { … }
#if BUILDFLAG(IS_WIN)
#define MAYBE_WriteOverMaxLimit …
#else
#define MAYBE_WriteOverMaxLimit …
#endif
TEST_F(WebRtcRtpDumpWriterTest, MAYBE_WriteOverMaxLimit) { … }
TEST_F(WebRtcRtpDumpWriterTest, DestroyWriterBeforeEndDumpCallback) { … }
TEST_F(WebRtcRtpDumpWriterTest, EndDumpsSeparately) { … }