chromium/net/nqe/socket_watcher_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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_ =;

// Verify that the buffer size is never exceeded.
TEST_F(NetworkQualitySocketWatcherTest, NotificationsThrottled) {}

TEST_F(NetworkQualitySocketWatcherTest, QuicFirstNotificationDropped) {}

#if BUILDFLAG(IS_IOS)
// Flaky on iOS: crbug.com/672917.
#define MAYBE_PrivateAddressRTTNotNotified
#else
#define MAYBE_PrivateAddressRTTNotNotified
#endif
TEST_F(NetworkQualitySocketWatcherTest, MAYBE_PrivateAddressRTTNotNotified) {}

TEST_F(NetworkQualitySocketWatcherTest, RemoteHostIPHashComputedCorrectly) {}

}  // namespace

}  // namespace net::nqe::internal