#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/log/net_log.h"
#include "base/memory/raw_ptr.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/task_environment.h"
#include "base/threading/simple_thread.h"
#include "base/values.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_source_type.h"
#include "net/log/net_log_with_source.h"
#include "net/log/test_net_log.h"
#include "net/log/test_net_log_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
const int kThreads = …;
const int kEvents = …;
int CaptureModeToInt(NetLogCaptureMode capture_mode) { … }
base::Value CaptureModeToValue(NetLogCaptureMode capture_mode) { … }
base::Value::Dict NetCaptureModeParams(NetLogCaptureMode capture_mode) { … }
TEST(NetLogTest, BasicGlobalEvents) { … }
TEST(NetLogTest, BasicEventsWithSource) { … }
TEST(NetLogTest, CaptureModes) { … }
class CountingObserver : public NetLog::ThreadSafeObserver { … };
class LoggingObserver : public NetLog::ThreadSafeObserver { … };
void AddEvent(NetLog* net_log) { … }
class NetLogTestThread : public base::SimpleThread { … };
class AddEventsTestThread : public NetLogTestThread { … };
class AddRemoveObserverTestThread : public NetLogTestThread { … };
template <class ThreadType>
void RunTestThreads(NetLog* net_log) { … }
TEST(NetLogTest, NetLogEventThreads) { … }
TEST(NetLogTest, NetLogAddRemoveObserver) { … }
TEST(NetLogTest, NetLogTwoObservers) { … }
TEST(NetLogTest, NetLogAddRemoveObserverThreads) { … }
TEST(NetLogTest, NetLogEntryToValueEmptyParams) { … }
}
}