ChangeLog

 12011-03-30 Martin Robinson <mrobinson@igalia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [GTK] [WebKit2] Implement a basic WebKitTestRunner
 6 https://bugs.webkit.org/show_bug.cgi?id=57068
 7
 8 * GNUmakefile.am: Added reference to WebKitTestRunner GNUmakefile.
 9
1102011-04-09 Keith Kyzivat <keith.kyzivat@nokia.com>
211
312 Reviewed by Laszlo Gombos.

GNUmakefile.am

@@include Source/WebCore/GNUmakefile.am
230230if ENABLE_WEBKIT2
231231include Source/WebKit2/GNUmakefile.am
232232include Tools/MiniBrowser/gtk/GNUmakefile.am
 233include Tools/WebKitTestRunner/GNUmakefile.am
233234# [GTK] Refactor the translations now that we have webkit2
234235# https://bugs.webkit.org/show_bug.cgi?id=55153
235236stamp-po:

Source/WebKit2/ChangeLog

 12011-03-30 Martin Robinson <mrobinson@igalia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [GTK] [WebKit2] Implement a basic WebKitTestRunner
 6 https://bugs.webkit.org/show_bug.cgi?id=57068
 7
 8 Added InjectedBundle support for GTK+.
 9
 10 * WebProcess/InjectedBundle/InjectedBundle.h: Added typedef for GTK+.
 11 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added implementation.
 12 (WebKit::InjectedBundle::load):
 13 (WebKit::InjectedBundle::activateMacFontAscentHack):
 14 * WebProcess/WebPage/gtk/WebPageGtk.cpp: Remove unnecessary method definition.
 15
1162011-04-08 Alexey Proskuryakov <ap@apple.com>
217
318 Reviewed by Darin Adler.

Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

3939#include <QLibrary>
4040#endif
4141
 42#if PLATFORM(GTK)
 43typedef struct _GModule GModule;
 44#endif
 45
4246namespace CoreIPC {
4347 class ArgumentDecoder;
4448 class Connection;

@@typedef HMODULE PlatformBundle;
5458#elif PLATFORM(QT)
5559typedef QLibrary PlatformBundle;
5660#elif PLATFORM(GTK)
57 typedef void* PlatformBundle;
 61typedef ::GModule* PlatformBundle;
5862#endif
5963
6064class ImmutableArray;

Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp

2929
3030#include "WKBundleAPICast.h"
3131#include "WKBundleInitialize.h"
32 #include <WebCore/NotImplemented.h>
 32#include <WebCore/FileSystem.h>
 33#include <wtf/text/CString.h>
3334
3435using namespace WebCore;
3536
3637namespace WebKit {
3738
38 bool InjectedBundle::load(APIObject*)
 39bool InjectedBundle::load(APIObject* initializationUserData)
3940{
40  return false;
 41 m_platformBundle = g_module_open(fileSystemRepresentation(m_path).data(), G_MODULE_BIND_LOCAL);
 42 if (!m_platformBundle) {
 43 g_warning("Error loading the injected bundle (%s): %s", m_path.utf8().data(), g_module_error());
 44 return false;
 45 }
 46
 47 WKBundleInitializeFunctionPtr initializeFunction = 0;
 48 if (!g_module_symbol(m_platformBundle, "WKBundleInitialize", reinterpret_cast<void**>(&initializeFunction)) || !initializeFunction) {
 49 g_warning("Error loading WKBundleInitialize symbol from injected bundle.");
 50 return false;
 51 }
 52
 53 initializeFunction(toAPI(this), toAPI(initializationUserData));
 54 return true;
4155}
4256
4357void InjectedBundle::activateMacFontAscentHack()
4458{
45  notImplemented();
4659}
4760
4861} // namespace WebKit

Tools/ChangeLog

 12011-03-30 Martin Robinson <mrobinson@igalia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [GTK] [WebKit2] Implement a basic WebKitTestRunner
 6 https://bugs.webkit.org/show_bug.cgi?id=57068
 7
 8 Add an implementation of WebKitTestRunner for GTK+.
 9
 10 * Scripts/build-webkittestrunner: Added knowledge of GTK+ TestRunner.
 11 * Scripts/old-run-webkit-tests: Ditto.
 12 * Scripts/run-launcher: Ditto.
 13 * Scripts/webkitdirs.pm: Ditto.
 14 * WebKitTestRunner/GNUmakefile.am: Added.
 15 * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
 16 * WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp: Added.
 17 * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
 18 * WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
 19 * WebKitTestRunner/PlatformWebView.h:
 20 * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Added.
 21 * WebKitTestRunner/gtk/TestControllerGtk.cpp: Added.
 22 * WebKitTestRunner/gtk/TestInvocationGtk.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
 23 (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
 24 * WebKitTestRunner/gtk/main.cpp: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
 25 (main): Added.
 26
1272011-04-09 Keith Kyzivat <keith.kyzivat@nokia.com>
228
329 Reviewed by Laszlo Gombos.

Tools/Scripts/build-webkittestrunner

@@if (isAppleMacWebKit()) {
6363 $result = buildXCodeProject("WebKitTestRunner", $clean, XcodeOptions(), @ARGV);
6464} elsif (isAppleWinWebKit()) {
6565 $result = buildVisualStudioProject("WebKitTestRunner.sln", $clean);
66 } elsif (isQt()) {
67  # Qt builds everything in one shot. No need to build anything here.
 66} elsif (isQt() || isGtk()) {
 67 # Qt and GTK+ build everything in one shot. No need to build anything here.
6868 $result = 0;
6969} else {
7070 die "WebKitTestRunner is not supported on this platform.\n";

Tools/Scripts/old-run-webkit-tests

@@if ($useWebKitTestRunner) {
380380 } elsif (isQt()) {
381381 $realPlatform = $platform;
382382 $platform = "qt-wk2";
 383 } elsif (isGtk()) {
 384 $realPlatform = $platform;
 385 $platform = "gtk-wk2";
383386 }
384387}
385388

@@close HTML;
11761179my @configurationArgs = argumentsForConfiguration();
11771180
11781181if (isGtk()) {
 1182 push(@configurationArgs, '-2') if $useWebKitTestRunner;
11791183 system "Tools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari;
11801184} elsif (isQt()) {
11811185 unshift @configurationArgs, qw(-graphicssystem raster -style windows);

@@sub openDumpTool()
15031507 if (isGtk()) {
15041508 $CLEAN_ENV{GTK_MODULES} = "gail";
15051509 $CLEAN_ENV{WEBKIT_INSPECTOR_PATH} = "$productDir/resources/inspector";
 1510
 1511 if ($useWebKitTestRunner) {
 1512 my $injectedBundlePath = productDir() . "/Libraries/.libs/libTestRunnerInjectedBundle";
 1513 $CLEAN_ENV{TEST_RUNNER_INJECTED_BUNDLE_FILENAME} = $injectedBundlePath;
 1514 }
15061515 }
15071516
15081517 if (isQt()) {

@@sub expectedDirectoryForTest($;$;$)
16961705 if (isAppleWinWebKit()) {
16971706 push @extraPlatforms, "mac-wk2" if $platform eq "win-wk2";
16981707 push @extraPlatforms, qw(mac-snowleopard mac);
 1708 } elsif (isGtk()) {
 1709 push @extraPlatforms, "gtk" if $platform eq "gtk-wk2";
16991710 }
17001711
17011712 push @directories, map { catdir($platformBaseDirectory, $_) } @extraPlatforms;

Tools/Scripts/run-launcher

@@if (isQt()) {
6565} else {
6666
6767 if (isGtk()) {
68  $launcherPath = catdir($launcherPath, "Programs", "GtkLauncher");
 68 if (isWK2()) {
 69 $launcherPath = catdir($launcherPath, "Programs", "MiniBrowser");
 70 } else {
 71 $launcherPath = catdir($launcherPath, "Programs", "GtkLauncher");
 72 }
6973 }
7074
7175 if (isEfl()) {

Tools/Scripts/webkitdirs.pm

@@sub builtDylibPathForName
630630 return "$configurationProductDir/libwxwebkit.dylib";
631631 }
632632 if (isGtk()) {
633  my $libraryDir = "$configurationProductDir/.libs/";
634  my $extension = isDarwin() ? "dylib" : "so";
635  if (-e $libraryDir . "libwebkitgtk-3.0.$extension") {
636  return $libraryDir . "libwebkitgtk-3.0.$extension";
 633 # WebKitGTK+ for GTK2, WebKitGTK+ for GTK3, and WebKit2 respectively.
 634 my @libraries = ("libwebkitgtk-1.0", "libwebkitgtk-3.0", "libwebkit2gtk-1.0");
 635 my $extension = isDarwin() ? ".dylib" : ".so";
 636
 637 foreach (@libraries) {
 638 my $library = "$configurationProductDir/.libs/" . $_ . $extension;
 639 if (-e $library) {
 640 return $library;
 641 }
637642 }
638  return $libraryDir . "libwebkitgtk-1.0.$extension";
 643 return "NotFound";
639644 }
640645 if (isEfl()) {
641646 return "$configurationProductDir/$libraryName/../WebKit/libewebkit.so";

@@sub runWebKitTestRunner
19631968 } else {
19641969 return system $webKitTestRunnerPath, @ARGV;
19651970 }
 1971 } elsif (isGtk()) {
 1972 my $productDir = productDir();
 1973 my $injectedBundlePath = "$productDir/Libraries/.libs/libTestRunnerInjectedBundle";
 1974 print "Starting WebKitTestRunner with TEST_RUNNER_INJECTED_BUNDLE_FILENAME set to point to $injectedBundlePath.\n";
 1975 $ENV{TEST_RUNNER_INJECTED_BUNDLE_FILENAME} = $injectedBundlePath;
 1976 return system "$productDir/Programs/WebKitTestRunner", @ARGV;
19661977 }
19671978
19681979 return 1;

Tools/WebKitTestRunner/GNUmakefile.am

 1BUILT_SOURCES += \
 2 generate-webkittestrunner-forwarding-headers
 3
 4generate-webkittestrunner-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_WebKitTestRunner_SOURCES)
 5 $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include gtk
 6 $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include soup
 7
 8noinst_PROGRAMS += \
 9 Programs/WebKitTestRunner
 10
 11Programs_WebKitTestRunner_SOURCES = \
 12 Tools/WebKitTestRunner/gtk/main.cpp \
 13 Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp \
 14 Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp \
 15 Tools/WebKitTestRunner/gtk/TestInvocationGtk.cpp \
 16 Tools/WebKitTestRunner/PlatformWebView.h \
 17 Tools/WebKitTestRunner/StringFunctions.h \
 18 Tools/WebKitTestRunner/TestController.cpp \
 19 Tools/WebKitTestRunner/TestController.h \
 20 Tools/WebKitTestRunner/TestInvocation.cpp \
 21 Tools/WebKitTestRunner/TestInvocation.h
 22
 23Programs_WebKitTestRunner_CPPFLAGS = \
 24 -include Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \
 25 -I$(srcdir)/Tools/WebKitTestRunner \
 26 -I$(top_builddir)/DerivedSources/WebKit2/include \
 27 $(global_cppflags) \
 28 $(javascriptcore_cppflags) \
 29 $(GLOBALDEPS_CFLAGS) \
 30 $(CAIRO_CFLAGS) \
 31 $(GTK_CFLAGS) \
 32 $(LIBSOUP_CFLAGS)
 33Programs_WebKitTestRunner_CXXFLAGS = $(global_cxxflags)
 34Programs_WebKitTestRunner_CFLAGS = $(global_cflags)
 35
 36Programs_WebKitTestRunner_LDADD = \
 37 libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
 38 $(GLOBALDEPS_LIBS) \
 39 $(CAIRO_LIBS) \
 40 $(GTK_LIBS) \
 41 $(GLIB_LIBS) \
 42 $(LIBSOUP_LIBS) \
 43 $(FREETYPE_LIBS) \
 44 $(WINMM_LIBS)
 45
 46Programs_WebKitTestRunner_LDFLAGS = \
 47 -no-fast-install \
 48 -no-install
 49
 50# The InjectedBundle library allows the render process to load harness code.
 51noinst_LTLIBRARIES += Libraries/libTestRunnerInjectedBundle.la
 52
 53injected_bundle_built_sources = \
 54 DerivedSources/InjectedBundle/JSEventSendingController.cpp \
 55 DerivedSources/InjectedBundle/JSGCController.cpp \
 56 DerivedSources/InjectedBundle/JSLayoutTestController.cpp
 57BUILT_SOURCES += $(injected_bundle_built_sources)
 58
 59Libraries_libTestRunnerInjectedBundle_la_SOURCES = \
 60 $(injected_bundle_built_sources) \
 61 Tools/WebKitTestRunner/InjectedBundle/ActivateFonts.h \
 62 Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrappable.h \
 63 Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp \
 64 Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.h \
 65 Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp \
 66 Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h \
 67 Tools/WebKitTestRunner/InjectedBundle/GCController.cpp \
 68 Tools/WebKitTestRunner/InjectedBundle/GCController.h \
 69 Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp \
 70 Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp \
 71 Tools/WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp \
 72 Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp \
 73 Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h \
 74 Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp \
 75 Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp \
 76 Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h \
 77 Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp \
 78 Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
 79
 80Libraries_libTestRunnerInjectedBundle_la_LDFLAGS = \
 81 -rpath ${shell pwd}/$(top_builddir)/../unix/TestNetscapePlugin/.libs \
 82 $(no_undefined) \
 83 -avoid-version \
 84 -module
 85
 86Libraries_libTestRunnerInjectedBundle_la_CPPFLAGS = \
 87 -DFONTS_CONF_DIR=\"${shell pwd}/${srcdir}/Tools/DumpRenderTree/gtk/fonts\" \
 88 -include Tools/WebKitTestRunner/WebKitTestRunnerPrefix.h \
 89 -I$(srcdir)/Tools/WebKitTestRunner \
 90 -I$(srcdir)/Tools/WebKitTestRunner/InjectedBundle \
 91 -I$(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings \
 92 -I$(top_builddir)/DerivedSources/InjectedBundle \
 93 -I$(top_builddir)/DerivedSources/WebKit2/include \
 94 $(global_cppflags) \
 95 $(javascriptcore_cppflags) \
 96 $(GLOBALDEPS_CFLAGS) \
 97 $(CAIRO_CFLAGS) \
 98 $(GLIB_CFLAGS) \
 99 $(GTK_CFLAGS) \
 100 $(LIBSOUP_CFLAGS)
 101Libraries_libTestRunnerInjectedBundle_la_CXXFLAGS = $(global_cxxflags)
 102Libraries_libTestRunnerInjectedBundle_la_CFLAGS = $(global_cflags)
 103
 104code_generation_dependencies = \
 105 Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm \
 106 Source/WebCore/bindings/scripts/CodeGenerator.pm \
 107 Source/WebCore/bindings/scripts/IDLParser.pm \
 108 Source/WebCore/bindings/scripts/IDLStructure.pm \
 109 Source/WebCore/bindings/scripts/InFilesParser.pm \
 110 Source/WebCore/bindings/scripts/generate-bindings.pl
 111
 112DerivedSources/InjectedBundle/JS%.cpp: Tools/WebKitTestRunner/InjectedBundle/Bindings/%.idl $(code_generation_dependencies)
 113 $(AM_V_GEN)$(PERL) \
 114 -I $(srcdir)/Source/WebCore/bindings/scripts \
 115 -I $(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings \
 116 $(srcdir)/Source/WebCore/bindings/scripts/generate-bindings.pl \
 117 --defines \"\" --generator TestRunner \
 118 --include $(srcdir)/Tools/InjectedBundle/Bindings \
 119 --outputDir $(top_builddir)/DerivedSources/InjectedBundle \
 120 $<

Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

@@typedef UINT_PTR PlatformTimerRef;
4040#elif PLATFORM(QT)
4141#include <QTimer>
4242typedef QTimer PlatformTimerRef;
 43#elif PLATFORM(GTK)
 44typedef unsigned int PlatformTimerRef;
4345#endif
4446
4547namespace WTR {

Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp

 1/*
 2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
 4 * Copyright (C) 2010 Igalia S.L.
 5 *
 6 * Redistribution and use in source and binary forms, with or without
 7 * modification, are permitted provided that the following conditions
 8 * are met:
 9 *
 10 * 1. Redistributions of source code must retain the above copyright
 11 * notice, this list of conditions and the following disclaimer.
 12 * 2. Redistributions in binary form must reproduce the above copyright
 13 * notice, this list of conditions and the following disclaimer in the
 14 * documentation and/or other materials provided with the distribution.
 15 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
 16 * its contributors may be used to endorse or promote products derived
 17 * from this software without specific prior written permission.
 18 *
 19 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 20 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 22 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32#include "ActivateFonts.h"
 33
 34#include <fontconfig/fontconfig.h>
 35#include <gtk/gtk.h>
 36#include <wtf/gobject/GOwnPtr.h>
 37
 38namespace WTR {
 39
 40void initializeGtkSettings()
 41{
 42
 43 GtkSettings* settings = gtk_settings_get_default();
 44 if (!settings)
 45 return;
 46 g_object_set(settings,
 47 "gtk-xft-dpi", 98304,
 48 "gtk-xft-antialias", 1,
 49 "gtk-xft-hinting", 0,
 50 "gtk-font-name", "Liberation Sans 12",
 51 "gtk-theme-name", "Raleigh",
 52 "gtk-xft-rgba", "none", NULL);
 53}
 54
 55void inititializeFontConfigSetting()
 56{
 57 FcInit();
 58
 59 // If a test resulted a font being added or removed via the @font-face rule, then
 60 // we want to reset the FontConfig configuration to prevent it from affecting other tests.
 61 static int numFonts = 0;
 62 FcFontSet* appFontSet = FcConfigGetFonts(0, FcSetApplication);
 63 if (appFontSet && numFonts && appFontSet->nfont == numFonts)
 64 return;
 65
 66 // Load our configuration file, which sets up proper aliases for family
 67 // names like sans, serif and monospace.
 68 FcConfig* config = FcConfigCreate();
 69 GOwnPtr<gchar> fontConfigFilename(g_build_filename(FONTS_CONF_DIR, "fonts.conf", NULL));
 70 if (!g_file_test(fontConfigFilename.get(), G_FILE_TEST_IS_REGULAR))
 71 g_error("Cannot find fonts.conf at %s\n", fontConfigFilename.get());
 72 if (!FcConfigParseAndLoad(config, reinterpret_cast<FcChar8*>(fontConfigFilename.get()), true))
 73 g_error("Couldn't load font configuration file from: %s", fontConfigFilename.get());
 74
 75 static const char *const fontPaths[][2] = {
 76 { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-BoldItalic.ttf",
 77 "/usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf", },
 78 { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Bold.ttf",
 79 "/usr/share/fonts/liberation/LiberationMono-Bold.ttf", },
 80 { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Italic.ttf",
 81 "/usr/share/fonts/liberation/LiberationMono-Italic.ttf", },
 82 { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Regular.ttf",
 83 "/usr/share/fonts/liberation/LiberationMono-Regular.ttf", },
 84 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf",
 85 "/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf", },
 86 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Bold.ttf",
 87 "/usr/share/fonts/liberation/LiberationSans-Bold.ttf", },
 88 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Italic.ttf",
 89 "/usr/share/fonts/liberation/LiberationSans-Italic.ttf", },
 90 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf",
 91 "/usr/share/fonts/liberation/LiberationSans-Regular.ttf", },
 92 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-BoldItalic.ttf",
 93 "/usr/share/fonts/liberation/LiberationSerif-BoldItalic.ttf", },
 94 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Bold.ttf",
 95 "/usr/share/fonts/liberation/LiberationSerif-Bold.ttf", },
 96 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Italic.ttf",
 97 "/usr/share/fonts/liberation/LiberationSerif-Italic.ttf", },
 98 { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Regular.ttf",
 99 "/usr/share/fonts/liberation/LiberationSerif-Regular.ttf", },
 100 { "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
 101 "/usr/share/fonts/dejavu/DejaVuSans.ttf", },
 102 { "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf",
 103 "/usr/share/fonts/dejavu/DejaVuSerif.ttf", },
 104
 105 // MathML tests require the STIX fonts.
 106 { "/usr/share/fonts/opentype/stix/STIXGeneral.otf",
 107 "/usr/share/fonts/stix/STIXGeneral.otf" },
 108 { "/usr/share/fonts/opentype/stix/STIXGeneralBolIta.otf",
 109 "/usr/share/fonts/stix/STIXGeneralBolIta.otf" },
 110 { "/usr/share/fonts/opentype/stix/STIXGeneralBol.otf",
 111 "/usr/share/fonts/stix/STIXGeneralBol.otf" },
 112 { "/usr/share/fonts/opentype/stix/STIXGeneralItalic.otf",
 113 "/usr/share/fonts/stix/STIXGeneralItalic.otf" }
 114 };
 115
 116 // TODO: Some tests use Lucida. We should load these as well, once it becomes
 117 // clear how to install these fonts easily on Fedora.
 118 for (size_t font = 0; font < G_N_ELEMENTS(fontPaths); font++) {
 119 bool found = false;
 120 for (size_t path = 0; path < 2; path++) {
 121
 122 if (g_file_test(fontPaths[font][path], G_FILE_TEST_EXISTS)) {
 123 found = true;
 124 if (!FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(fontPaths[font][path])))
 125 g_error("Could not load font at %s!", fontPaths[font][path]);
 126 else
 127 break;
 128 }
 129 }
 130
 131 if (!found)
 132 g_error("Could not find font at %s. Either install this font or file a bug "
 133 "at http://bugs.webkit.org if it is installed in another location.",
 134 fontPaths[font][0]);
 135 }
 136
 137 // Ahem is used by many layout tests.
 138 GOwnPtr<gchar> ahemFontFilename(g_build_filename(FONTS_CONF_DIR, "AHEM____.TTF", NULL));
 139 if (!FcConfigAppFontAddFile(config, reinterpret_cast<FcChar8*>(ahemFontFilename.get())))
 140 g_error("Could not load font at %s!", ahemFontFilename.get());
 141
 142 static const char* fontFilenames[] = {
 143 "ColorBits.ttf",
 144 "WebKitWeightWatcher100.ttf",
 145 "WebKitWeightWatcher200.ttf",
 146 "WebKitWeightWatcher300.ttf",
 147 "WebKitWeightWatcher400.ttf",
 148 "WebKitWeightWatcher500.ttf",
 149 "WebKitWeightWatcher600.ttf",
 150 "WebKitWeightWatcher700.ttf",
 151 "WebKitWeightWatcher800.ttf",
 152 "WebKitWeightWatcher900.ttf",
 153 0
 154 };
 155
 156 for (size_t i = 0; fontFilenames[i]; ++i) {
 157 GOwnPtr<gchar> fontFilename(g_build_filename(FONTS_CONF_DIR, "..", "..", "fonts", fontFilenames[i], NULL));
 158 if (!FcConfigAppFontAddFile(config, reinterpret_cast<FcChar8*>(fontFilename.get())))
 159 g_error("Could not load font at %s!", fontFilename.get());
 160 }
 161
 162 // A font with no valid Fontconfig encoding to test https://bugs.webkit.org/show_bug.cgi?id=47452
 163 GOwnPtr<gchar> fontWithNoValidEncodingFilename(g_build_filename(FONTS_CONF_DIR, "FontWithNoValidEncoding.fon", NULL));
 164 if (!FcConfigAppFontAddFile(config, reinterpret_cast<FcChar8*>(fontWithNoValidEncodingFilename.get())))
 165 g_error("Could not load font at %s!", fontWithNoValidEncodingFilename.get());
 166
 167 if (!FcConfigSetCurrent(config))
 168 g_error("Could not set the current font configuration!");
 169
 170 numFonts = FcConfigGetFonts(config, FcSetApplication)->nfont;
 171}
 172
 173void activateFonts()
 174{
 175 initializeGtkSettings();
 176 inititializeFontConfigSetting();
 177}
 178
 179}

Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 * Copyright (C) 2011 Igalia S.L.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 24 * THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#include "config.h"
 28#include "InjectedBundle.h"
 29
 30namespace WTR {
 31
 32static void logHandler(const gchar* domain, GLogLevelFlags level, const gchar* message, gpointer data)
 33{
 34 if (level < G_LOG_LEVEL_DEBUG)
 35 fprintf(stderr, "%s\n", message);
 36}
 37
 38
 39void InjectedBundle::platformInitialize(WKTypeRef)
 40{
 41 // Some plugins might try to use the GLib logger for printing debug messages. This
 42 // will cause tests to fail because of unexpected output. We squelch all debug
 43 // messages sent to the logger.
 44 g_log_set_default_handler(logHandler, 0);
 45}
 46
 47} // namespace WTR

Tools/WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp

 1/*
 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
 3 * Copyright (C) 2011 Igalia S.L.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 16 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 24 * THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#include "config.h"
 28#include "LayoutTestController.h"
 29
 30#include "InjectedBundle.h"
 31#include <glib.h>
 32
 33namespace WTR {
 34
 35static gboolean waitToDumpWatchdogTimerCallback(gpointer)
 36{
 37 InjectedBundle::shared().layoutTestController()->waitToDumpWatchdogTimerFired();
 38 return FALSE;
 39}
 40
 41void LayoutTestController::platformInitialize()
 42{
 43 m_waitToDumpWatchdogTimer = 0;
 44}
 45
 46void LayoutTestController::invalidateWaitToDumpWatchdogTimer()
 47{
 48 if (!m_waitToDumpWatchdogTimer)
 49 return;
 50 g_source_remove(m_waitToDumpWatchdogTimer);
 51 m_waitToDumpWatchdogTimer = 0;
 52}
 53
 54void LayoutTestController::initializeWaitToDumpWatchdogTimerIfNeeded()
 55{
 56 if (m_waitToDumpWatchdogTimer)
 57 return;
 58
 59 m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000,
 60 waitToDumpWatchdogTimerCallback, 0);
 61}
 62
 63} // namespace WTR

Tools/WebKitTestRunner/PlatformWebView.h

@@typedef NSWindow* PlatformWindow;
4646#elif defined(WIN32) || defined(_WIN32)
4747typedef WKViewRef PlatformWKView;
4848typedef HWND PlatformWindow;
 49#elif defined(BUILDING_GTK__)
 50typedef struct _GtkWidget GtkWidget;
 51typedef WKViewRef PlatformWKView;
 52typedef GtkWidget* PlatformWindow;
4953#endif
5054
5155namespace WTR {

Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp

 1/*
 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
 3 * Copyright (C) 2010 University of Szeged. All rights reserved.
 4 * Copyright (C) 2010 Igalia S.L.
 5 *
 6 * Redistribution and use in source and binary forms, with or without
 7 * modification, are permitted provided that the following conditions
 8 * are met:
 9 * 1. Redistributions of source code must retain the above copyright
 10 * notice, this list of conditions and the following disclaimer.
 11 * 2. Redistributions in binary form must reproduce the above copyright
 12 * notice, this list of conditions and the following disclaimer in the
 13 * documentation and/or other materials provided with the distribution.
 14 *
 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 26 */
 27
 28#include "config.h"
 29#include "PlatformWebView.h"
 30
 31#include <gtk/gtk.h>
 32
 33namespace WTR {
 34
 35PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup)
 36 : m_view(WKViewCreate(context, pageGroup))
 37 , m_window(gtk_window_new(GTK_WINDOW_POPUP))
 38{
 39 gtk_container_add(GTK_CONTAINER(m_window), WKViewGetWindow(m_view));
 40
 41 GtkAllocation size = { 0, 0, 800, 600 };
 42 gtk_widget_size_allocate(m_window, &size);
 43 gtk_window_resize(GTK_WINDOW(m_window), 800, 600);
 44 gtk_widget_show_all(m_window);
 45
 46 while (gtk_events_pending())
 47 gtk_main_iteration();
 48}
 49
 50PlatformWebView::~PlatformWebView()
 51{
 52 gtk_widget_destroy(m_window);
 53}
 54
 55void PlatformWebView::resizeTo(unsigned width, unsigned height)
 56{
 57 GtkAllocation size = { 0, 0, width, height };
 58 gtk_widget_size_allocate(m_window, &size);
 59 gtk_window_resize(GTK_WINDOW(m_window), width, height);
 60
 61 while (gtk_events_pending())
 62 gtk_main_iteration();
 63}
 64
 65WKPageRef PlatformWebView::page()
 66{
 67 return WKViewGetPage(m_view);
 68}
 69
 70void PlatformWebView::focus()
 71{
 72}
 73
 74WKRect PlatformWebView::windowFrame()
 75{
 76 GtkAllocation geometry;
 77#ifdef GTK_API_VERSION_2
 78 gint depth;
 79 gdk_window_get_geometry(gtk_widget_get_window(GTK_WIDGET(m_window)),
 80 &geometry.x, &geometry.y, &geometry.width, &geometry.height, &depth);
 81#else
 82 gdk_window_get_geometry(gtk_widget_get_window(GTK_WIDGET(m_window)),
 83 &geometry.x, &geometry.y, &geometry.width, &geometry.height);
 84#endif
 85
 86 WKRect frame;
 87 frame.origin.x = geometry.x;
 88 frame.origin.y = geometry.y;
 89 frame.size.width = geometry.width;
 90 frame.size.height = geometry.height;
 91 return frame;
 92}
 93
 94void PlatformWebView::setWindowFrame(WKRect frame)
 95{
 96 gtk_window_move(GTK_WINDOW(m_window), frame.origin.x, frame.origin.y);
 97 resizeTo(frame.size.width, frame.size.height);
 98}
 99
 100} // namespace WTR
 101

Tools/WebKitTestRunner/gtk/TestControllerGtk.cpp

 1/*
 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
 3 * Copyright (C) 2010 Igalia S.L.
 4 *
 5 * Redistribution and use in source and binary forms, with or without
 6 * modification, are permitted provided that the following conditions
 7 * are met:
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 15 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 16 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 17 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 18 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 19 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 20 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 25 */
 26
 27#include "config.h"
 28#include "TestController.h"
 29
 30#include <wtf/Platform.h>
 31#include <wtf/gobject/GOwnPtr.h>
 32#include <wtf/text/WTFString.h>
 33
 34namespace WTR {
 35
 36static guint gTimeoutSourceId = 0;
 37
 38static void cancelTimeout()
 39{
 40 if (!gTimeoutSourceId)
 41 return;
 42 g_source_remove(gTimeoutSourceId);
 43 gTimeoutSourceId = 0;
 44}
 45
 46void TestController::notifyDone()
 47{
 48 gtk_main_quit();
 49 cancelTimeout();
 50}
 51
 52void TestController::platformInitialize()
 53{
 54}
 55
 56static gboolean timeoutCallback(gpointer)
 57{
 58 fprintf(stderr, "FAIL: TestControllerRunLoop timed out.\n");
 59 gtk_main_quit();
 60 return FALSE;
 61}
 62
 63void TestController::platformRunUntil(bool&, double timeout)
 64{
 65 cancelTimeout();
 66 gTimeoutSourceId = g_timeout_add(timeout * 1000, timeoutCallback, 0);
 67 gtk_main();
 68}
 69
 70void TestController::initializeInjectedBundlePath()
 71{
 72 const char* bundlePath = g_getenv("TEST_RUNNER_INJECTED_BUNDLE_FILENAME");
 73 if (!bundlePath) {
 74 fprintf(stderr, "TEST_RUNNER_INJECTED_BUNDLE_FILENAME environment variable not found\n");
 75 exit(0);
 76 }
 77
 78 gsize bytesWritten;
 79 GOwnPtr<char> utf8BundlePath(g_filename_to_utf8(bundlePath, -1, 0, &bytesWritten, 0));
 80 m_injectedBundlePath = WKStringCreateWithUTF8CString(utf8BundlePath.get());
 81}
 82
 83void TestController::initializeTestPluginDirectory()
 84{
 85 // This is called after initializeInjectedBundlePath.
 86 m_testPluginDirectory = m_injectedBundlePath;
 87}
 88
 89void TestController::platformInitializeContext()
 90{
 91}
 92
 93void TestController::runModal(PlatformWebView*)
 94{
 95 // FIXME: Need to implement this to test showModalDialog.
 96}
 97
 98const char* TestController::platformLibraryPathForTesting()
 99{
 100 return 0;
 101}
 102
 103} // namespace WTR

Tools/WebKitTestRunner/gtk/TestInvocationGtk.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "TestInvocation.h"
 28
 29namespace WTR {
 30
 31void TestInvocation::dumpPixelsAndCompareWithExpected(const OpaqueWKImage*)
 32{
 33}
 34
 35} // namespace WTR

Tools/WebKitTestRunner/gtk/main.cpp

 1/*
 2 * Copyright (C) 2011 Igalia S.L.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27
 28#include "TestController.h"
 29
 30int main(int argc, char** argv)
 31{
 32 gtk_init(&argc, &argv);
 33 WTR::TestController controller(argc, const_cast<const char**>(argv));
 34 return 0;
 35}