#include "net/nqe/socket_watcher.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "net/base/ip_address.h"
#include "net/socket/socket_performance_watcher_factory.h"
#include "net/test/test_with_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net::nqe::internal {
namespace {
class NetworkQualitySocketWatcherTest : public TestWithTaskEnvironment { … };
base::TimeDelta NetworkQualitySocketWatcherTest::callback_rtt_ = …;
std::optional<IPHash> NetworkQualitySocketWatcherTest::callback_host_ = …;
bool NetworkQualitySocketWatcherTest::callback_executed_ = …;
bool NetworkQualitySocketWatcherTest::should_notify_rtt_callback_ = …;
TEST_F(NetworkQualitySocketWatcherTest, NotificationsThrottled) { … }
TEST_F(NetworkQualitySocketWatcherTest, QuicFirstNotificationDropped) { … }
#if BUILDFLAG(IS_IOS)
#define MAYBE_PrivateAddressRTTNotNotified …
#else
#define MAYBE_PrivateAddressRTTNotNotified …
#endif
TEST_F(NetworkQualitySocketWatcherTest, MAYBE_PrivateAddressRTTNotNotified) { … }
TEST_F(NetworkQualitySocketWatcherTest, RemoteHostIPHashComputedCorrectly) { … }
}
}