chromium/ui/base/webui/i18n_source_stream_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <utility>

#include "base/memory/raw_ptr.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
#include "net/filter/mock_source_stream.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/webui/i18n_source_stream.h"

namespace ui {

namespace {

// This constant is rather arbitrary, though the offsets and other sizes must
// be less than kBufferSize.
const int kBufferSize =;

const int kMinimumSize =;
const int kSmallSize =;  // Arbitrary small value > 1.
const int kInOneReadSize =;

struct I18nTest {};

constexpr I18nTest kTestEmpty =;

constexpr I18nTest kTestNoReplacements =;

constexpr I18nTest kTestTagAtEndOfLine =;

constexpr I18nTest kTestOneReplacement =;

constexpr I18nTest kTestOneReplacementPlus =;

constexpr I18nTest kTestThreeReplacements =;

constexpr I18nTest kTestExtraBraces =;

// These tests with generic names are sequences that might catch an error in the
// future, depending on how the code changes.
constexpr I18nTest kTest1 =;

constexpr I18nTest kTest2 =;

struct I18nTestParam {};

}  // namespace

class I18nSourceStreamTest : public ::testing::TestWithParam<I18nTestParam> {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(I18nSourceStreamTest, FilterTests) {}

TEST_P(I18nSourceStreamTest, LargeFilterTests) {}

}  // namespace ui