summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/webkit_test_platform_support_android.cc27
1 files changed, 26 insertions, 1 deletions
diff --git a/content/shell/webkit_test_platform_support_android.cc b/content/shell/webkit_test_platform_support_android.cc
index a91690c..cd8f076 100644
--- a/content/shell/webkit_test_platform_support_android.cc
+++ b/content/shell/webkit_test_platform_support_android.cc
@@ -4,6 +4,27 @@
#include "content/shell/webkit_test_platform_support.h"
+#include "third_party/skia/include/ports/SkTypeface_android.h"
+
+namespace {
+
+// The root directory on the device to which resources will be pushed. This
+// value needs to be equal to that set in chromium_android.py.
+#define DEVICE_SOURCE_ROOT_DIR "/data/local/tmp/content_shell/"
+
+// Primary font configuration file on the device for Skia.
+const char kPrimaryFontConfig[] =
+ DEVICE_SOURCE_ROOT_DIR "android_main_fonts.xml";
+
+// The file on the device containing the fallback font configuration for Skia.
+const char kFallbackFontConfig[] =
+ DEVICE_SOURCE_ROOT_DIR "android_fallback_fonts.xml";
+
+// The directory in which fonts will be stored on the Android device.
+const char kFontDirectory[] = DEVICE_SOURCE_ROOT_DIR "fonts/";
+
+} // namespace
+
namespace content {
bool CheckLayoutSystemDeps() {
@@ -11,7 +32,11 @@ bool CheckLayoutSystemDeps() {
}
bool WebKitTestPlatformInitialize() {
+ // Initialize Skia with the font configuration files crafted for layout tests.
+ SkUseTestFontConfigFile(
+ kPrimaryFontConfig, kFallbackFontConfig, kFontDirectory);
+
return true;
}
-} // namespace
+} // namespace content