Changeset 87760 in webkit
- Timestamp:
- May 31, 2011 4:35:34 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 11 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r87742 r87760 1 2011-03-30 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Adam Roben. 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 1 10 2011-05-31 Xan Lopez <xlopez@igalia.com> 2 11 -
trunk/GNUmakefile.am
r85595 r87760 199 199 include Source/WebKit2/GNUmakefile.am 200 200 include Tools/MiniBrowser/gtk/GNUmakefile.am 201 include Tools/WebKitTestRunner/GNUmakefile.am 201 202 # [GTK] Refactor the translations now that we have webkit2 202 203 # https://bugs.webkit.org/show_bug.cgi?id=55153 -
trunk/Source/WebKit2/ChangeLog
r87755 r87760 1 2011-03-30 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Adam Roben. 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 1 16 2011-05-31 Dan Bernstein <mitz@apple.com> 2 17 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
r87452 r87760 40 40 #endif 41 41 42 #if PLATFORM(GTK) 43 typedef struct _GModule GModule; 44 #endif 45 42 46 namespace CoreIPC { 43 47 class ArgumentDecoder; … … 55 59 typedef QLibrary PlatformBundle; 56 60 #elif PLATFORM(GTK) 57 typedef void* PlatformBundle;61 typedef ::GModule* PlatformBundle; 58 62 #endif 59 63 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
r82370 r87760 30 30 #include "WKBundleAPICast.h" 31 31 #include "WKBundleInitialize.h" 32 #include <WebCore/NotImplemented.h> 32 #include <WebCore/FileSystem.h> 33 #include <wtf/text/CString.h> 33 34 34 35 using namespace WebCore; … … 36 37 namespace WebKit { 37 38 38 bool InjectedBundle::load(APIObject* )39 bool InjectedBundle::load(APIObject* initializationUserData) 39 40 { 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; 41 55 } 42 56 43 57 void InjectedBundle::activateMacFontAscentHack() 44 58 { 45 notImplemented();46 59 } 47 60 -
trunk/Tools/ChangeLog
r87757 r87760 1 2011-03-30 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Adam Roben. 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 1 27 2011-05-31 Dirk Pranke <dpranke@chromium.org> 2 28 -
trunk/Tools/Scripts/build-webkittestrunner
r74301 r87760 64 64 } elsif (isAppleWinWebKit()) { 65 65 $result = buildVisualStudioProject("WebKitTestRunner.sln", $clean); 66 } elsif (isQt() ) {67 # Qt buildseverything 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. 68 68 $result = 0; 69 69 } else { -
trunk/Tools/Scripts/old-run-webkit-tests
r87189 r87760 389 389 $realPlatform = $platform; 390 390 $platform = "qt-wk2"; 391 } elsif (isGtk()) { 392 $realPlatform = $platform; 393 $platform = "gtk-wk2"; 391 394 } 392 395 } … … 1175 1178 1176 1179 if (isGtk()) { 1180 push(@configurationArgs, '-2') if $useWebKitTestRunner; 1177 1181 system "Tools/Scripts/run-launcher", @configurationArgs, "file://".$testResults if $launchSafari; 1178 1182 } elsif (isQt()) { … … 1477 1481 $CLEAN_ENV{GTK_MODULES} = "gail"; 1478 1482 $CLEAN_ENV{WEBKIT_INSPECTOR_PATH} = "$productDir/resources/inspector"; 1483 1484 if ($useWebKitTestRunner) { 1485 my $injectedBundlePath = productDir() . "/Libraries/.libs/libTestRunnerInjectedBundle"; 1486 $CLEAN_ENV{TEST_RUNNER_INJECTED_BUNDLE_FILENAME} = $injectedBundlePath; 1487 } 1479 1488 } 1480 1489 … … 2135 2144 push @platforms, $platform; 2136 2145 push @platforms, "qt"; 2146 } elsif ($platform =~ /^gtk-/) { 2147 push @platforms, $platform; 2148 push @platforms, "gtk"; 2137 2149 } else { 2138 2150 @platforms = $platform; -
trunk/Tools/Scripts/webkitdirs.pm
r86141 r87760 629 629 } 630 630 if (isGtk()) { 631 my $libraryDir = "$configurationProductDir/.libs/"; 632 my $extension = isDarwin() ? "dylib" : "so"; 633 if (-e $libraryDir . "libwebkitgtk-3.0.$extension") { 634 return $libraryDir . "libwebkitgtk-3.0.$extension"; 635 } 636 return $libraryDir . "libwebkitgtk-1.0.$extension"; 631 # WebKitGTK+ for GTK2, WebKitGTK+ for GTK3, and WebKit2 respectively. 632 my @libraries = ("libwebkitgtk-1.0", "libwebkitgtk-3.0", "libwebkit2gtk-1.0"); 633 my $extension = isDarwin() ? ".dylib" : ".so"; 634 635 foreach $libraryName (@libraries) { 636 my $libraryPath = "$configurationProductDir/.libs/" . $libraryName . $extension; 637 return $libraryPath if -e $libraryPath; 638 } 639 return "NotFound"; 637 640 } 638 641 if (isEfl()) { … … 1991 1994 return system $webKitTestRunnerPath, @ARGV; 1992 1995 } 1996 } elsif (isGtk()) { 1997 my $productDir = productDir(); 1998 my $injectedBundlePath = "$productDir/Libraries/.libs/libTestRunnerInjectedBundle"; 1999 print "Starting WebKitTestRunner with TEST_RUNNER_INJECTED_BUNDLE_FILENAME set to point to $injectedBundlePath.\n"; 2000 $ENV{TEST_RUNNER_INJECTED_BUNDLE_FILENAME} = $injectedBundlePath; 2001 my @args = ("$productDir/Programs/WebKitTestRunner", @ARGV); 2002 return system {$args[0] } @args; 1993 2003 } 1994 2004 -
trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
r87452 r87760 42 42 #include <QTimer> 43 43 typedef QTimer PlatformTimerRef; 44 #elif PLATFORM(GTK) 45 typedef unsigned int PlatformTimerRef; 44 46 #endif 45 47 -
trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp
r87758 r87760 1 1 /* 2 * Copyright (C) 201 0Apple Inc. All rights reserved.3 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.2 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Igalia S.L. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 28 28 #include "InjectedBundle.h" 29 29 30 #include "WKBundleAPICast.h" 31 #include "WKBundleInitialize.h" 32 #include <WebCore/NotImplemented.h> 30 #include <cstdio> 31 #include <glib.h> 33 32 34 using namespace WebCore; 33 namespace WTR { 35 34 36 namespace WebKit { 37 38 bool InjectedBundle::load(APIObject*) 35 static void logHandler(const gchar* domain, GLogLevelFlags level, const gchar* message, gpointer data) 39 36 { 40 return false; 37 if (level < G_LOG_LEVEL_DEBUG) 38 fprintf(stderr, "%s\n", message); 41 39 } 42 40 43 void InjectedBundle:: activateMacFontAscentHack()41 void InjectedBundle::platformInitialize(WKTypeRef) 44 42 { 45 notImplemented(); 43 // Some plugins might try to use the GLib logger for printing debug messages. This 44 // will cause tests to fail because of unexpected output. We squelch all debug 45 // messages sent to the logger. 46 g_log_set_default_handler(logHandler, 0); 46 47 } 47 48 48 } // namespace W ebKit49 } // namespace WTR -
trunk/Tools/WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp
r87758 r87760 1 1 /* 2 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved.3 * Copyright (C) 2011 Igalia S.L. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 26 26 27 27 #include "config.h" 28 #include "LayoutTestController.h" 29 28 30 #include "InjectedBundle.h" 31 #include <glib.h> 29 32 30 #include "WKBundleAPICast.h" 31 #include "WKBundleInitialize.h" 32 #include <WebCore/NotImplemented.h> 33 namespace WTR { 33 34 34 using namespace WebCore; 35 36 namespace WebKit { 37 38 bool InjectedBundle::load(APIObject*) 35 static gboolean waitToDumpWatchdogTimerCallback(gpointer) 39 36 { 40 return false; 37 InjectedBundle::shared().layoutTestController()->waitToDumpWatchdogTimerFired(); 38 return FALSE; 41 39 } 42 40 43 void InjectedBundle::activateMacFontAscentHack()41 void LayoutTestController::platformInitialize() 44 42 { 45 notImplemented();43 m_waitToDumpWatchdogTimer = 0; 46 44 } 47 45 48 } // namespace WebKit 46 void LayoutTestController::invalidateWaitToDumpWatchdogTimer() 47 { 48 if (!m_waitToDumpWatchdogTimer) 49 return; 50 g_source_remove(m_waitToDumpWatchdogTimer); 51 m_waitToDumpWatchdogTimer = 0; 52 } 53 54 void LayoutTestController::initializeWaitToDumpWatchdogTimerIfNeeded() 55 { 56 if (m_waitToDumpWatchdogTimer) 57 return; 58 59 m_waitToDumpWatchdogTimer = g_timeout_add(waitToDumpWatchdogTimerInterval * 1000, 60 waitToDumpWatchdogTimerCallback, 0); 61 } 62 63 JSRetainPtr<JSStringRef> LayoutTestController::pathToLocalResource(JSStringRef url) 64 { 65 return url; 66 } 67 68 } // namespace WTR -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r73976 r87760 47 47 typedef WKViewRef PlatformWKView; 48 48 typedef HWND PlatformWindow; 49 #elif defined(BUILDING_GTK__) 50 typedef struct _GtkWidget GtkWidget; 51 typedef WKViewRef PlatformWKView; 52 typedef GtkWidget* PlatformWindow; 49 53 #endif 50 54 -
trunk/Tools/WebKitTestRunner/gtk/TestInvocationGtk.cpp
r87758 r87760 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved. 4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 26 25 27 26 #include "config.h" 28 #include " InjectedBundle.h"27 #include "TestInvocation.h" 29 28 30 #include "WKBundleAPICast.h" 31 #include "WKBundleInitialize.h" 32 #include <WebCore/NotImplemented.h> 29 namespace WTR { 33 30 34 using namespace WebCore; 35 36 namespace WebKit { 37 38 bool InjectedBundle::load(APIObject*) 31 void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image) 39 32 { 40 return false;41 33 } 42 34 43 void InjectedBundle::activateMacFontAscentHack() 44 { 45 notImplemented(); 46 } 47 48 } // namespace WebKit 35 } // namespace WTR -
trunk/Tools/WebKitTestRunner/gtk/main.cpp
r87758 r87760 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Portions Copyright (c) 2010 Motorola Mobility, Inc. All rights reserved. 2 * Copyright (C) 2011 Igalia S.L. 4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 26 25 27 26 #include "config.h" 28 #include "InjectedBundle.h"29 27 30 #include "WKBundleAPICast.h" 31 #include "WKBundleInitialize.h" 32 #include <WebCore/NotImplemented.h> 28 #include "TestController.h" 29 #include <gtk/gtk.h> 33 30 34 using namespace WebCore; 35 36 namespace WebKit { 37 38 bool InjectedBundle::load(APIObject*) 31 int main(int argc, char** argv) 39 32 { 40 return false; 33 gtk_init(&argc, &argv); 34 WTR::TestController controller(argc, const_cast<const char**>(argv)); 35 return 0; 41 36 } 42 43 void InjectedBundle::activateMacFontAscentHack()44 {45 notImplemented();46 }47 48 } // namespace WebKit
Note: See TracChangeset
for help on using the changeset viewer.