Commit 4a2d4efa authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Move some variables from fontconfig_util_linux into unittest

R=derat@chromium.org

Change-Id: Idbb641f8c5b522db79b6852a0c4c456176c4b672
Reviewed-on: https://chromium-review.googlesource.com/835418
Commit-Queue: Dan Erat <derat@chromium.org>
Reviewed-by: default avatarDan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525295}
parent 9cda1346
......@@ -17,6 +17,18 @@ namespace gfx {
namespace {
// Strings appearing at the beginning and end of Fontconfig XML files.
const char kFontconfigFileHeader[] =
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n"
"<fontconfig>\n";
const char kFontconfigFileFooter[] = "</fontconfig>";
// Strings appearing at the beginning and end of Fontconfig <match> stanzas.
const char kFontconfigMatchFontHeader[] = " <match target=\"font\">\n";
const char kFontconfigMatchPatternHeader[] = " <match target=\"pattern\">\n";
const char kFontconfigMatchFooter[] = " </match>\n";
// Implementation of LinuxFontDelegate that returns a canned FontRenderParams
// struct. This is used to isolate tests from the system's local configuration.
class TestFontDelegate : public LinuxFontDelegate {
......
......@@ -61,15 +61,6 @@ const char* const kCloudStorageSyncedFonts[] = {
const size_t kNumCloudStorageSyncedFonts = arraysize(kCloudStorageSyncedFonts);
const char kFontconfigFileHeader[] =
"<?xml version=\"1.0\"?>\n"
"<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\n"
"<fontconfig>\n";
const char kFontconfigFileFooter[] = "</fontconfig>";
const char kFontconfigMatchFontHeader[] = " <match target=\"font\">\n";
const char kFontconfigMatchPatternHeader[] = " <match target=\"pattern\">\n";
const char kFontconfigMatchFooter[] = " </match>\n";
void SetUpFontconfig() {
FcInit();
......
......@@ -9,7 +9,9 @@
#include <string>
#include "base/files/file_path.h"
namespace base {
class FilePath;
}
namespace gfx {
......@@ -21,15 +23,6 @@ extern const size_t kNumSystemFontsForFontconfig;
extern const char* const kCloudStorageSyncedFonts[];
extern const size_t kNumCloudStorageSyncedFonts;
// Strings appearing at the beginning and end of Fontconfig XML files.
extern const char kFontconfigFileHeader[];
extern const char kFontconfigFileFooter[];
// Strings appearing at the beginning and end of Fontconfig <match> stanzas.
extern const char kFontconfigMatchFontHeader[];
extern const char kFontconfigMatchPatternHeader[];
extern const char kFontconfigMatchFooter[];
// Initializes Fontconfig and creates and swaps in a new, empty config.
void SetUpFontconfig();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment