#include "chrome/browser/net/dns_probe_runner.h"
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "chrome/browser/net/dns_probe_test_util.h"
#include "content/public/test/browser_task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "net/dns/public/resolve_error_info.h"
#include "services/network/test/test_network_context.h"
#include "testing/gtest/include/gtest/gtest.h"
RunLoop;
BrowserTaskEnvironment;
namespace chrome_browser_net {
namespace {
class TestDnsProbeRunnerCallback { … };
class FakeNetworkContext : public network::TestNetworkContext { … };
class FirstHangingThenFakeResolverNetworkContext
: public network::TestNetworkContext { … };
class DnsProbeRunnerTest : public testing::Test { … };
void DnsProbeRunnerTest::SetupTest(int query_result,
net::ResolveErrorInfo resolve_error_info,
FakeHostResolver::Response query_response) { … }
void DnsProbeRunnerTest::SetupTest(
std::vector<FakeHostResolver::SingleResult> result_list) { … }
void DnsProbeRunnerTest::RunTest(DnsProbeRunner::Result expected_probe_result) { … }
TEST_F(DnsProbeRunnerTest, Probe_OK) { … }
TEST_F(DnsProbeRunnerTest, Probe_EMPTY) { … }
TEST_F(DnsProbeRunnerTest, Probe_TIMEOUT) { … }
TEST_F(DnsProbeRunnerTest, Probe_NXDOMAIN) { … }
TEST_F(DnsProbeRunnerTest, Probe_FAILING) { … }
TEST_F(DnsProbeRunnerTest, Probe_DnsNotRun) { … }
TEST_F(DnsProbeRunnerTest, Probe_SecureDnsHostnameNotResolved) { … }
TEST_F(DnsProbeRunnerTest, Probe_SecureDnsCertificateError) { … }
TEST_F(DnsProbeRunnerTest, TwoProbes) { … }
TEST_F(DnsProbeRunnerTest, MojoConnectionError) { … }
}
}