chromium/chrome/browser/local_discovery/service_discovery_client_unittest.cc

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

#include <stdint.h>

#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/task_environment.h"
#include "chrome/browser/local_discovery/service_discovery_client_impl.h"
#include "net/base/net_errors.h"
#include "net/dns/mdns_client_impl.h"
#include "net/dns/mock_mdns_socket_factory.h"
#include "net/dns/public/dns_protocol.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Invoke;
StrictMock;
NiceMock;
Mock;
SaveArg;
SetArgPointee;
Return;
Exactly;

namespace local_discovery {

namespace {

const uint8_t kSamplePacketPTR[] =;

const uint8_t kSamplePacketSRV[] =;

const uint8_t kSamplePacketTXT[] =;

const uint8_t kSamplePacketSRVA[] =;

const uint8_t kSamplePacketPTR2[] =;

const uint8_t kSamplePacketQuerySRV[] =;


class MockServiceWatcherClient {};

class ServiceDiscoveryTest : public ::testing::Test {};

TEST_F(ServiceDiscoveryTest, AddRemoveService) {}

TEST_F(ServiceDiscoveryTest, DiscoverNewServices) {}

// Test that we can query the network with a service name that includes
// characters beyond those explicitly allowed in DNS such as spaces and parens.
TEST_F(ServiceDiscoveryTest, DiscoverNewServicesUnrestricted) {}

TEST_F(ServiceDiscoveryTest, ReadCachedServices) {}


TEST_F(ServiceDiscoveryTest, ReadCachedServicesMultiple) {}


TEST_F(ServiceDiscoveryTest, OnServiceChanged) {}

TEST_F(ServiceDiscoveryTest, SinglePacket) {}

TEST_F(ServiceDiscoveryTest, ActivelyRefreshServices) {}


class ServiceResolverTest : public ServiceDiscoveryTest {};

TEST_F(ServiceResolverTest, TxtAndSrvButNoA) {}

TEST_F(ServiceResolverTest, TxtSrvAndA) {}

TEST_F(ServiceResolverTest, JustSrv) {}

TEST_F(ServiceResolverTest, WithNothing) {}

}  // namespace

}  // namespace local_discovery