chromium/third_party/blink/renderer/core/css/parser/css_tokenizer_test.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 "third_party/blink/renderer/core/css/parser/css_tokenizer.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_token_range.h"
#include "third_party/blink/renderer/core/css/parser/css_parser_token_stream.h"
#include "third_party/blink/renderer/platform/wtf/allocator/partitions.h"

namespace blink {

// This let's us see the line numbers of failing tests
#define TEST_TOKENS(string, ...)

void CompareTokens(const CSSParserToken& expected,
                   const CSSParserToken& actual) {}

void TestTokens(const String& string,
                const CSSParserToken& token1,
                const CSSParserToken& token2 = CSSParserToken(kEOFToken),
                const CSSParserToken& token3 = CSSParserToken(kEOFToken),
                bool unicode_ranges_allowed = false) {}

void TestUnicodeRangeTokens(
    const String& string,
    const CSSParserToken& token1,
    const CSSParserToken& token2 = CSSParserToken(kEOFToken),
    const CSSParserToken& token3 = CSSParserToken(kEOFToken)) {}

static CSSParserToken Ident(const String& string) {}
static CSSParserToken AtKeyword(const String& string) {}
static CSSParserToken GetString(const String& string) {}
static CSSParserToken Func(const String& string) {}
static CSSParserToken Url(const String& string) {}
static CSSParserToken GetHash(const String& string, HashTokenType type) {}
static CSSParserToken Delim(char c) {}

static CSSParserToken UnicodeRng(UChar32 start, UChar32 end) {}

static CSSParserToken Number(NumericValueType type,
                             double value,
                             NumericSign sign) {}

static CSSParserToken Dimension(NumericValueType type,
                                double value,
                                const String& string) {}

static CSSParserToken Percentage(NumericValueType type, double value) {}

// We need to initialize PartitionAlloc before creating CSSParserTokens
// because CSSParserToken depends on PartitionAlloc. It is safe to call
// WTF::Partitions::initialize() multiple times.
#define DEFINE_TOKEN

DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN
DEFINE_TOKEN

#undef DEFINE_TOKEN

String FromUChar32(UChar32 c) {}

TEST(CSSTokenizerTest, SingleCharacterTokens) {}

TEST(CSSTokenizerTest, MultipleCharacterTokens) {}

TEST(CSSTokenizerTest, DelimiterToken) {}

TEST(CSSTokenizerTest, WhitespaceTokens) {}

TEST(CSSTokenizerTest, Escapes) {}

TEST(CSSTokenizerTest, IdentToken) {}

TEST(CSSTokenizerTest, FunctionToken) {}

TEST(CSSTokenizerTest, AtKeywordToken) {}

TEST(CSSTokenizerTest, UrlToken) {}

TEST(CSSTokenizerTest, StringToken) {}

TEST(CSSTokenizerTest, HashToken) {}

TEST(CSSTokenizerTest, NumberToken) {}

TEST(CSSTokenizerTest, DimensionToken) {}

TEST(CSSTokenizerTest, PercentageToken) {}

TEST(CSSTokenizerTest, UnicodeRangeToken) {}

TEST(CSSTokenizerTest, CommentToken) {}

}  // namespace blink