chromium/ui/gfx/font_render_params_linux_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 "ui/gfx/font_render_params.h"

#include <fontconfig/fontconfig.h>

#include "base/check_op.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/test_fonts/fontconfig/fontconfig_util_linux.h"
#include "ui/gfx/font.h"
#include "ui/gfx/linux/fontconfig_util.h"
#include "ui/linux/fake_linux_ui.h"

namespace gfx {

namespace {

// Strings appearing at the beginning and end of Fontconfig XML files.
const char kFontconfigFileHeader[] =;
const char kFontconfigFileFooter[] =;

// Strings appearing at the beginning and end of Fontconfig <match> stanzas.
const char kFontconfigMatchFontHeader[] =;
const char kFontconfigMatchPatternHeader[] =;
const char kFontconfigMatchFooter[] =;

// Implementation of LinuxUi that returns a canned FontRenderParams
// struct. This is used to isolate tests from the system's local configuration.
class TestFontDelegate : public ui::FakeLinuxUi {};

// Loads XML-formatted |data| into the current font configuration.
bool LoadConfigDataIntoFontconfig(const std::string& data) {}

// Returns a Fontconfig <edit> stanza.
std::string CreateFontconfigEditStanza(const std::string& name,
                                       const std::string& type,
                                       const std::string& value) {}

// Returns a Fontconfig <test> stanza.
std::string CreateFontconfigTestStanza(const std::string& name,
                                       const std::string& op,
                                       const std::string& type,
                                       const std::string& value) {}

// Returns a Fontconfig <alias> stanza.
std::string CreateFontconfigAliasStanza(const std::string& original_family,
                                        const std::string& preferred_family) {}

}  // namespace

class FontRenderParamsTest : public testing::Test {};

TEST_F(FontRenderParamsTest, Default) {}

TEST_F(FontRenderParamsTest, Size) {}

TEST_F(FontRenderParamsTest, Style) {}

TEST_F(FontRenderParamsTest, Scalable) {}

TEST_F(FontRenderParamsTest, UseBitmaps) {}

TEST_F(FontRenderParamsTest, ForceFullHintingWhenAntialiasingIsDisabled) {}

TEST_F(FontRenderParamsTest, ForceSubpixelPositioning) {}

TEST_F(FontRenderParamsTest, OnlySetConfiguredValues) {}

TEST_F(FontRenderParamsTest, NoFontconfigMatch) {}

TEST_F(FontRenderParamsTest, MissingFamily) {}

TEST_F(FontRenderParamsTest, SubstituteFamily) {}

}  // namespace gfx