Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (101463 => 101464)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-30 09:37:51 UTC (rev 101464)
@@ -1,3 +1,12 @@
+2011-11-30 Fady Samuel <[email protected]>
+
+ [Chromium] Fix broken DRT build for Aura Linux
+ https://bugs.webkit.org/show_bug.cgi?id=72667
+
+ Reviewed by Tony Chang.
+
+ * WebKit.gyp:
+
2011-11-29 Nat Duca <[email protected]>
Unreviewed. Fix clang build by using raw pointers instead of static OwnPtrs
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (101463 => 101464)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2011-11-30 09:37:51 UTC (rev 101464)
@@ -1217,6 +1217,9 @@
]
}],
['toolkit_uses_gtk == 1', {
+ 'defines': [
+ 'WTF_USE_GTK=1',
+ ],
'dependencies': [
'<(chromium_src_dir)/build/linux/system.gyp:gtk',
],
Modified: trunk/Tools/ChangeLog (101463 => 101464)
--- trunk/Tools/ChangeLog 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Tools/ChangeLog 2011-11-30 09:37:51 UTC (rev 101464)
@@ -1,5 +1,34 @@
2011-11-30 Fady Samuel <[email protected]>
+ [Chromium] Fix broken DRT build for Aura Linux
+ https://bugs.webkit.org/show_bug.cgi?id=72667
+
+ Reviewed by Tony Chang.
+
+ DRT now builds for Aura Linux. This, more or less, shares the same code as Android.
+
+ The following changes have been made:
+
+ 1. Renamed TestShellAndroid to TestShellLinux.
+ 2. Stub code moved added in TestShellStub that will only compile on non-GTK Linux builds.
+ 3. Code common to Gtk, Aura, and Android moved to TestShellLinux.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/EventSender.cpp:
+ (EventSender::keyDown):
+ * DumpRenderTree/chromium/TestShellAndroid.cpp: Removed.
+ * DumpRenderTree/chromium/TestShellGtk.cpp:
+ * DumpRenderTree/chromium/TestShellLinux.cpp: Copied from Tools/DumpRenderTree/chromium/TestShellGtk.cpp.
+ (AlarmHandler):
+ (TestShell::waitTestFinished):
+ (setupFontconfig):
+ (platformInit):
+ * DumpRenderTree/chromium/TestShellStub.cpp: Added.
+ (checkLayoutTestSystemDependencies):
+ (openStartupDialog):
+
+2011-11-30 Fady Samuel <[email protected]>
+
[Chromium] Set Result Before Early Exit for Fixed Layout Methods in LayoutTestController
https://bugs.webkit.org/show_bug.cgi?id=73328
Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gypi (101463 => 101464)
--- trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2011-11-30 09:37:51 UTC (rev 101464)
@@ -34,7 +34,7 @@
'chromium/TestNavigationController.h',
'chromium/TestShell.cpp',
'chromium/TestShell.h',
- 'chromium/TestShellAndroid.cpp',
+ 'chromium/TestShellLinux.cpp',
'chromium/TestShellGtk.cpp',
'chromium/TestShellMac.mm',
'chromium/TestShellWin.cpp',
@@ -73,6 +73,11 @@
'TestNetscapePlugIn/main.cpp',
],
'conditions': [
+ ['(OS=="linux" and toolkit_uses_gtk!=1) or OS=="android"', {
+ 'drt_files': [
+ 'chromium/TestShellStub.cpp',
+ ],
+ }],
['OS=="win"', {
'drt_files': [
'chromium/WebThemeControlDRTWin.cpp',
Modified: trunk/Tools/DumpRenderTree/chromium/EventSender.cpp (101463 => 101464)
--- trunk/Tools/DumpRenderTree/chromium/EventSender.cpp 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Tools/DumpRenderTree/chromium/EventSender.cpp 2011-11-30 09:37:51 UTC (rev 101464)
@@ -576,7 +576,7 @@
eventDown.type = WebInputEvent::RawKeyDown;
eventDown.modifiers = 0;
eventDown.windowsKeyCode = code;
-#if OS(LINUX)
+#if OS(LINUX) && USE(GTK)
eventDown.nativeKeyCode = webkit_support::NativeKeyCodeForWindowsKeyCode(code, needsShiftKeyModifier);
#endif
Deleted: trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp (101463 => 101464)
--- trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp 2011-11-30 09:37:51 UTC (rev 101464)
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "SkTypeface.h"
-#include "WebView.h"
-#include "webkit/support/webkit_support.h"
-
-#include <signal.h>
-#include <unistd.h>
-
-static void AlarmHandler(int)
-{
- // If the alarm alarmed, kill the process since we have a really bad hang.
- puts("\n#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- webkit_support::TearDownTestEnvironment();
- exit(0);
-}
-
-void TestShell::waitTestFinished()
-{
- ASSERT(!m_testIsPending);
- m_testIsPending = true;
-
- // Install an alarm signal handler that will kill us if we time out.
- struct sigaction alarmAction;
- alarmAction.sa_handler = AlarmHandler;
- sigemptyset(&alarmAction.sa_mask);
- alarmAction.sa_flags = 0;
-
- struct sigaction oldAction;
- sigaction(SIGALRM, &alarmAction, &oldAction);
- alarm(layoutTestTimeoutForWatchDog() / 1000);
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (m_testIsPending)
- webkit_support::RunMessageLoop();
-
- // Remove the alarm.
- alarm(0);
- sigaction(SIGALRM, &oldAction, 0);
-}
-
-void platformInit(int* argc, char*** argv)
-{
- // Nothing to do here.
-}
-
-void openStartupDialog()
-{
- // FIXME: Not implemented.
-}
-
-bool checkLayoutTestSystemDependencies()
-{
- // Nothing to do here.
- return true;
-}
Modified: trunk/Tools/DumpRenderTree/chromium/TestShellGtk.cpp (101463 => 101464)
--- trunk/Tools/DumpRenderTree/chromium/TestShellGtk.cpp 2011-11-30 09:27:08 UTC (rev 101463)
+++ trunk/Tools/DumpRenderTree/chromium/TestShellGtk.cpp 2011-11-30 09:37:51 UTC (rev 101464)
@@ -36,172 +36,7 @@
#include <gtk/gtk.h>
#include <signal.h>
-static void AlarmHandler(int)
-{
- // If the alarm alarmed, kill the process since we have a really bad hang.
- puts("\n#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- exit(0);
-}
-static void setupFontconfig()
-{
- // We wish to make the layout tests reproducable with respect to fonts. Skia
- // uses fontconfig to resolve font family names from WebKit into actual font
- // files found on the current system. This means that fonts vary based on the
- // system and also on the fontconfig configuration.
- //
- // To avoid this we initialise fontconfig here and install a configuration
- // which only knows about a few, select, fonts.
-
- // We have fontconfig parse a config file from our resources file. This
- // sets a number of aliases ("sans"->"Arial" etc), but doesn't include any
- // font directories.
- FcInit();
-
- char drtPath[PATH_MAX + 1];
- int drtPathSize = readlink("/proc/self/exe", drtPath, PATH_MAX);
- if (drtPathSize < 0 || drtPathSize > PATH_MAX) {
- fputs("Unable to resolve /proc/self/exe.", stderr);
- exit(1);
- }
- drtPath[drtPathSize] = 0;
- std::string drtDirPath(drtPath);
- size_t lastPathPos = drtDirPath.rfind("/");
- ASSERT(lastPathPos != std::string::npos);
- drtDirPath.erase(lastPathPos + 1);
-
- FcConfig* fontcfg = FcConfigCreate();
- std::string fontconfigPath = drtDirPath + "fonts.conf";
- if (!FcConfigParseAndLoad(fontcfg, reinterpret_cast<const FcChar8*>(fontconfigPath.c_str()), true)) {
- fputs("Failed to parse fontconfig config file\n", stderr);
- exit(1);
- }
-
- // This is the list of fonts that fontconfig will know about. It
- // will try its best to match based only on the fonts here in. The
- // paths are where these fonts are found on our Ubuntu boxes.
- static const char *const fonts[] = {
- "/usr/share/fonts/truetype/kochi/kochi-gothic.ttf",
- "/usr/share/fonts/truetype/kochi/kochi-mincho.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Impact.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf",
- "/usr/share/fonts/truetype/thai/Garuda.ttf",
- // The DejaVuSans font is used by the css2.1 tests.
- "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf",
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf",
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/MuktiNarrow.ttf",
- };
- for (size_t i = 0; i < arraysize(fonts); ++i) {
- if (access(fonts[i], R_OK)) {
- fprintf(stderr, "You are missing %s. Try re-running build/install-build-deps.sh. Also see "
- "http://code.google.com/p/chromium/wiki/LayoutTestsLinux",
- fonts[i]);
- exit(1);
- }
- if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) fonts[i])) {
- fprintf(stderr, "Failed to load font %s\n", fonts[i]);
- exit(1);
- }
- }
-
- // We special case these fonts because they're only needed in a
- // few layout tests.
- static const char* const optionalFonts[] = {
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf",
- };
- for (size_t i = 0; i < arraysize(optionalFonts); ++i) {
- const char* font = optionalFonts[i];
-
- // This font changed paths across Ubuntu releases, so try checking in both locations.
- if (!strcmp(font, "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf")
- && access(font, R_OK) < 0)
- font = "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf";
-
- if (access(font, R_OK) < 0) {
- fprintf(stderr, "You are missing %s. Without this, some layout tests may fail. "
- "See http://code.google.com/p/chromium/wiki/LayoutTestsLinux "
- "for more.\n", font);
- } else if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) font)) {
- fprintf(stderr, "Failed to load font %s\n", font);
- exit(1);
- }
- }
-
- // Also load the layout-test-specific "Ahem" font.
- std::string ahemPath = drtDirPath + "AHEM____.TTF";
- if (!FcConfigAppFontAddFile(fontcfg, reinterpret_cast<const FcChar8*>(ahemPath.c_str()))) {
- fprintf(stderr, "Failed to load font %s\n", ahemPath.c_str());
- exit(1);
- }
-
- if (!FcConfigSetCurrent(fontcfg)) {
- fputs("Failed to set the default font configuration\n", stderr);
- exit(1);
- }
-}
-
-void TestShell::waitTestFinished()
-{
- ASSERT(!m_testIsPending);
- m_testIsPending = true;
-
- // Install an alarm signal handler that will kill us if we time out.
- struct sigaction alarmAction;
- alarmAction.sa_handler = AlarmHandler;
- sigemptyset(&alarmAction.sa_mask);
- alarmAction.sa_flags = 0;
-
- struct sigaction oldAction;
- sigaction(SIGALRM, &alarmAction, &oldAction);
- alarm(layoutTestTimeoutForWatchDog() / 1000);
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (m_testIsPending)
- webkit_support::RunMessageLoop();
-
- // Remove the alarm.
- alarm(0);
- sigaction(SIGALRM, &oldAction, 0);
-}
-
-void platformInit(int* argc, char*** argv)
-{
- // FIXME: It's better call gtk_init() only when we run plugin tests.
- // See http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/633ea167cde196ca#
- gtk_init(argc, argv);
-
- setupFontconfig();
-}
-
void openStartupDialog()
{
GtkWidget* dialog = gtk_message_dialog_new(
Copied: trunk/Tools/DumpRenderTree/chromium/TestShellLinux.cpp (from rev 101463, trunk/Tools/DumpRenderTree/chromium/TestShellGtk.cpp) (0 => 101464)
--- trunk/Tools/DumpRenderTree/chromium/TestShellLinux.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/TestShellLinux.cpp 2011-11-30 09:37:51 UTC (rev 101464)
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "TestShell.h"
+
+#include "SkTypeface.h"
+#include "WebView.h"
+#include "webkit/support/webkit_support.h"
+
+#if !OS(ANDROID)
+#include <fontconfig/fontconfig.h>
+#endif
+
+#if USE(GTK)
+#include <gtk/gtk.h>
+#endif
+#include <signal.h>
+#include <unistd.h>
+
+static void AlarmHandler(int)
+{
+ // If the alarm alarmed, kill the process since we have a really bad hang.
+ puts("\n#TEST_TIMED_OUT\n");
+ puts("#EOF\n");
+ fflush(stdout);
+ exit(0);
+}
+
+void TestShell::waitTestFinished()
+{
+ ASSERT(!m_testIsPending);
+ m_testIsPending = true;
+
+ // Install an alarm signal handler that will kill us if we time out.
+ struct sigaction alarmAction;
+ alarmAction.sa_handler = AlarmHandler;
+ sigemptyset(&alarmAction.sa_mask);
+ alarmAction.sa_flags = 0;
+
+ struct sigaction oldAction;
+ sigaction(SIGALRM, &alarmAction, &oldAction);
+ alarm(layoutTestTimeoutForWatchDog() / 1000);
+
+ // TestFinished() will post a quit message to break this loop when the page
+ // finishes loading.
+ while (m_testIsPending)
+ webkit_support::RunMessageLoop();
+
+ // Remove the alarm.
+ alarm(0);
+ sigaction(SIGALRM, &oldAction, 0);
+}
+
+#if !OS(ANDROID)
+static void setupFontconfig()
+{
+ // We wish to make the layout tests reproducable with respect to fonts. Skia
+ // uses fontconfig to resolve font family names from WebKit into actual font
+ // files found on the current system. This means that fonts vary based on the
+ // system and also on the fontconfig configuration.
+ //
+ // To avoid this we initialise fontconfig here and install a configuration
+ // which only knows about a few, select, fonts.
+
+ // We have fontconfig parse a config file from our resources file. This
+ // sets a number of aliases ("sans"->"Arial" etc), but doesn't include any
+ // font directories.
+ FcInit();
+
+ char drtPath[PATH_MAX + 1];
+ int drtPathSize = readlink("/proc/self/exe", drtPath, PATH_MAX);
+ if (drtPathSize < 0 || drtPathSize > PATH_MAX) {
+ fputs("Unable to resolve /proc/self/exe.", stderr);
+ exit(1);
+ }
+ drtPath[drtPathSize] = 0;
+ std::string drtDirPath(drtPath);
+ size_t lastPathPos = drtDirPath.rfind("/");
+ ASSERT(lastPathPos != std::string::npos);
+ drtDirPath.erase(lastPathPos + 1);
+
+ FcConfig* fontcfg = FcConfigCreate();
+ std::string fontconfigPath = drtDirPath + "fonts.conf";
+ if (!FcConfigParseAndLoad(fontcfg, reinterpret_cast<const FcChar8*>(fontconfigPath.c_str()), true)) {
+ fputs("Failed to parse fontconfig config file\n", stderr);
+ exit(1);
+ }
+
+ // This is the list of fonts that fontconfig will know about. It
+ // will try its best to match based only on the fonts here in. The
+ // paths are where these fonts are found on our Ubuntu boxes.
+ static const char *const fonts[] = {
+ "/usr/share/fonts/truetype/kochi/kochi-gothic.ttf",
+ "/usr/share/fonts/truetype/kochi/kochi-mincho.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Impact.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf",
+ "/usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf",
+ "/usr/share/fonts/truetype/thai/Garuda.ttf",
+ // The DejaVuSans font is used by the css2.1 tests.
+ "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
+ "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf",
+ "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf",
+ "/usr/share/fonts/truetype/ttf-indic-fonts-core/MuktiNarrow.ttf",
+ };
+ for (size_t i = 0; i < arraysize(fonts); ++i) {
+ if (access(fonts[i], R_OK)) {
+ fprintf(stderr, "You are missing %s. Try re-running build/install-build-deps.sh. Also see "
+ "http://code.google.com/p/chromium/wiki/LayoutTestsLinux",
+ fonts[i]);
+ exit(1);
+ }
+ if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) fonts[i])) {
+ fprintf(stderr, "Failed to load font %s\n", fonts[i]);
+ exit(1);
+ }
+ }
+
+ // We special case these fonts because they're only needed in a
+ // few layout tests.
+ static const char* const optionalFonts[] = {
+ "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf",
+ };
+ for (size_t i = 0; i < arraysize(optionalFonts); ++i) {
+ const char* font = optionalFonts[i];
+
+ // This font changed paths across Ubuntu releases, so try checking in both locations.
+ if (!strcmp(font, "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf")
+ && access(font, R_OK) < 0)
+ font = "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf";
+
+ if (access(font, R_OK) < 0) {
+ fprintf(stderr, "You are missing %s. Without this, some layout tests may fail. "
+ "See http://code.google.com/p/chromium/wiki/LayoutTestsLinux "
+ "for more.\n", font);
+ } else if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) font)) {
+ fprintf(stderr, "Failed to load font %s\n", font);
+ exit(1);
+ }
+ }
+
+ // Also load the layout-test-specific "Ahem" font.
+ std::string ahemPath = drtDirPath + "AHEM____.TTF";
+ if (!FcConfigAppFontAddFile(fontcfg, reinterpret_cast<const FcChar8*>(ahemPath.c_str()))) {
+ fprintf(stderr, "Failed to load font %s\n", ahemPath.c_str());
+ exit(1);
+ }
+
+ if (!FcConfigSetCurrent(fontcfg)) {
+ fputs("Failed to set the default font configuration\n", stderr);
+ exit(1);
+ }
+}
+#endif // !OS(ANDROID)
+
+void platformInit(int* argc, char*** argv)
+{
+ // FIXME: It's better call gtk_init() only when we run plugin tests.
+ // See http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/633ea167cde196ca#
+#if USE(GTK)
+ gtk_init(argc, argv);
+#endif
+
+#if !OS(ANDROID)
+ setupFontconfig();
+#endif
+}
+
Added: trunk/Tools/DumpRenderTree/chromium/TestShellStub.cpp (0 => 101464)
--- trunk/Tools/DumpRenderTree/chromium/TestShellStub.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/TestShellStub.cpp 2011-11-30 09:37:51 UTC (rev 101464)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include "config.h"
+
+#include "TestShell.h"
+
+bool checkLayoutTestSystemDependencies()
+{
+ return true;
+}
+
+void openStartupDialog()
+{
+ // FIXME: Not implemented.
+}
+