Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: ui/gfx/test/fontconfig_util_linux.h

Issue 394963002: linux: Add tests for FontRenderParams on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix embarrassingly-broken comparison Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/gfx_tests.gyp ('k') | ui/gfx/test/fontconfig_util_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/test/fontconfig_util_linux.h
diff --git a/ui/gfx/test/fontconfig_util_linux.h b/ui/gfx/test/fontconfig_util_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1b91fa459d8ab0607376d1c0d1c5e44e04edff0
--- /dev/null
+++ b/ui/gfx/test/fontconfig_util_linux.h
@@ -0,0 +1,59 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_TEST_FONTCONFIG_UTIL_LINUX_H_
+#define UI_GFX_TEST_FONTCONFIG_UTIL_LINUX_H_
+
+#include <string>
+
+#include "base/files/file_path.h"
+
+namespace gfx {
+
+// Array of paths to font files that are expected to exist on machines where
+// tests are run.
+extern const char* const kSystemFontsForFontconfig[];
+extern const size_t kNumSystemFontsForFontconfig;
+
+// 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 kFontconfigMatchHeader[];
+extern const char kFontconfigMatchFooter[];
+
+// Initializes Fontconfig and creates and swaps in a new, empty config.
+void SetUpFontconfig();
+
+// Deinitializes Fontconfig.
+void TearDownFontconfig();
+
+// Loads the font file at |path| into the current config, returning true on
+// success.
+bool LoadFontIntoFontconfig(const base::FilePath& path);
+
+// Instructs Fontconfig to load |path|, an XML configuration file, into the
+// current config, returning true on success.
+bool LoadConfigFileIntoFontconfig(const base::FilePath& path);
+
+// Writes |data| to a file in |temp_dir| and passes it to
+// LoadConfigFileIntoFontconfig().
+bool LoadConfigDataIntoFontconfig(const base::FilePath& temp_dir,
+ 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);
+
+} // namespace gfx
+
+#endif // UI_GFX_TEST_FONTCONFIG_UTIL_LINUX_H_
« no previous file with comments | « ui/gfx/gfx_tests.gyp ('k') | ui/gfx/test/fontconfig_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698