chromium/net/dns/mdns_cache_unittest.cc

// Copyright 2013 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/dns/mdns_cache.h"

#include <algorithm>
#include <utility>

#include "base/functional/bind.h"
#include "base/time/time.h"
#include "net/dns/dns_response.h"
#include "net/dns/dns_test_util.h"
#include "net/dns/record_parsed.h"
#include "net/dns/record_rdata.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Return;
StrictMock;

namespace net {

static const uint8_t kTestResponsesDifferentAnswers[] =;

static const uint8_t kTestResponsesSameAnswers[] =;

static const uint8_t kTestResponseTwoRecords[] =;

static const uint8_t kTestResponsesGoodbyePacket[] =;

static const uint8_t kTestResponsesDifferentCapitalization[] =;

class RecordRemovalMock {};

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

// Test a single insert, corresponding lookup, and unsuccessful lookup.
TEST_F(MDnsCacheTest, InsertLookupSingle) {}

// Test that records expire when their ttl has passed.
TEST_F(MDnsCacheTest, Expiration) {}

// Test that a new record replacing one with the same identity (name/rrtype for
// unique records) causes the cache to output a "record changed" event.
TEST_F(MDnsCacheTest, RecordChange) {}

// Test that a new record replacing an otherwise identical one already in the
// cache causes the cache to output a "no change" event.
TEST_F(MDnsCacheTest, RecordNoChange) {}

// Test that the next expiration time of the cache is updated properly on record
// insertion.
TEST_F(MDnsCacheTest, RecordPreemptExpirationTime) {}

// Test that the cache handles mDNS "goodbye" packets correctly, not adding the
// records to the cache if they are not already there, and eventually removing
// records from the cache if they are.
TEST_F(MDnsCacheTest, GoodbyePacket) {}

TEST_F(MDnsCacheTest, AnyRRType) {}

TEST_F(MDnsCacheTest, RemoveRecord) {}

TEST_F(MDnsCacheTest, IsCacheOverfilled) {}

TEST_F(MDnsCacheTest, ClearOnOverfilledCleanup) {}

TEST_F(MDnsCacheTest, CaseInsensitive) {}

}  // namespace net