chromium/services/network/public/cpp/timing_allow_origin_parser_unittest.cc

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

#include "services/network/public/cpp/timing_allow_origin_parser.h"

#include <string>

#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

ElementsAre;
IsEmpty;

namespace network {

TEST(TimingAllowOriginParserTest, Empty) {}

// Underscores are not permitted in domain names. However, the parser shouldn't
// do anything clever, since the actual TAO check is implemented by comparing a
// serialized origin against a value parsed out of the header.
TEST(TimingAllowOriginParserTest, InvalidOrigin) {}

TEST(TimingAllowOriginParserTest, InvalidOriginWithEmbeddedWhitespace) {}

TEST(TimingAllowedOriginParserTest, SingleOrigin) {}

TEST(TimingAllowOriginParserTest, DuplicateOrigin) {}

TEST(TimingAllowOriginParserTest, SingleOriginWithWhitespacePadding) {}

TEST(TimingAllowedOriginParserTest, MultipleOrigins) {}

TEST(TimingAllowOriginParserTest, MultipleOriginsWithWhitespacePadding) {}

TEST(TimingAllowOriginParserTest, AllOrigins) {}

TEST(TimingAllowOriginParserTest, AllOriginsWithWhitespacePadding) {}

TEST(TimingAllowOriginParserTest, DuplicateWildcard) {}

// *, combined with any other origin, should still result in all origins
// allowed.
TEST(TimingAllowOriginParserTest, WildcardWithOtherOrigins) {}

TEST(TimingAllowOriginParserTest,
     WildcardWithOtherOriginsAndWhitespacePadding) {}

TEST(TimingAllowOriginParserTest, WildcardWithInvalidOrigins) {}

static bool TAOCheck(const std::string& tao, const std::string& url) {}

TEST(TimingAllowOriginParserTest, TAOCheck) {}

}  // namespace network