summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-18 15:53:33 +0200
commit6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch)
treed9c68d1cca0b3e352f1e438561f3e504e641a08f /Tools/DumpRenderTree
parentd0424a769059c84ae20beb3c217812792ea6726b (diff)
downloadqtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Tools/DumpRenderTree')
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp9
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp11
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/EventSender.h1
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellAndroid.cpp83
-rw-r--r--Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp2
-rw-r--r--Tools/DumpRenderTree/mac/Configurations/Base.xcconfig2
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTree.mm4
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTree.pro3
8 files changed, 30 insertions, 85 deletions
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
index 8e3347ca8..131d40f02 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
+++ b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
@@ -285,12 +285,21 @@
'<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code',
'<(chromium_src_dir)/tools/android/forwarder/forwarder.gyp:forwarder',
'<(chromium_src_dir)/tools/android/md5sum/md5sum.gyp:md5sum',
+ '<(source_dir)/WebKit/chromium/WebKitUnitTests.gyp:io_stream_forwarder_android',
],
'dependencies!': [
'ImageDiff',
'copy_TestNetscapePlugIn',
'<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa',
],
+ # FIXME: Remove when the io_stream_forwarder_android target is deprecated.
+ 'conditions': [
+ ['inside_chromium_build==1', {
+ 'include_dirs': [
+ '<(source_dir)/WebKit/chromium/',
+ ],
+ }],
+ ],
'copies': [{
'destination': '<(PRODUCT_DIR)',
'files': [
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp
index d5eaac4ad..236012865 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp
@@ -287,6 +287,7 @@ EventSender::EventSender()
bindMethod("gestureScrollUpdate", &EventSender::gestureScrollUpdate);
bindMethod("gestureTap", &EventSender::gestureTap);
bindMethod("gestureTapDown", &EventSender::gestureTapDown);
+ bindMethod("gestureTapCancel", &EventSender::gestureTapCancel);
bindMethod("gestureLongPress", &EventSender::gestureLongPress);
bindMethod("gestureTwoFingerTap", &EventSender::gestureTwoFingerTap);
bindMethod("zoomPageIn", &EventSender::zoomPageIn);
@@ -1119,6 +1120,12 @@ void EventSender::gestureTapDown(const CppArgumentList& arguments, CppVariant* r
gestureEvent(WebInputEvent::GestureTapDown, arguments);
}
+void EventSender::gestureTapCancel(const CppArgumentList& arguments, CppVariant* result)
+{
+ result->setNull();
+ gestureEvent(WebInputEvent::GestureTapCancel, arguments);
+}
+
void EventSender::gestureLongPress(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
@@ -1182,6 +1189,10 @@ void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList&
event.x = point.x;
event.y = point.y;
break;
+ case WebInputEvent::GestureTapCancel:
+ event.x = point.x;
+ event.y = point.y;
+ break;
case WebInputEvent::GestureLongPress:
event.x = point.x;
event.y = point.y;
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h
index 828e7c842..e6794a077 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h
+++ b/Tools/DumpRenderTree/chromium/TestRunner/EventSender.h
@@ -106,6 +106,7 @@ public:
void gestureScrollUpdate(const CppArgumentList&, CppVariant*);
void gestureTap(const CppArgumentList&, CppVariant*);
void gestureTapDown(const CppArgumentList&, CppVariant*);
+ void gestureTapCancel(const CppArgumentList&, CppVariant*);
void gestureLongPress(const CppArgumentList&, CppVariant*);
void gestureTwoFingerTap(const CppArgumentList&, CppVariant*);
void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&);
diff --git a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp b/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
index 188158440..8f8eedc3d 100644
--- a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
@@ -32,15 +32,8 @@
#include "TestShell.h"
#include "linux/WebFontRendering.h"
+#include "tests/ForwardIOStreamsAndroid.h"
#include "third_party/skia/include/ports/SkTypeface_android.h"
-#include <android/log.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <wtf/Assertions.h>
namespace {
@@ -51,46 +44,6 @@ const char fontMainConfigFile[] = DEVICE_DRT_DIR "android_main_fonts.xml";
const char fontFallbackConfigFile[] = DEVICE_DRT_DIR "android_fallback_fonts.xml";
const char fontsDir[] = DEVICE_DRT_DIR "fonts/";
-const char optionInFIFO[] = "--in-fifo=";
-const char optionOutFIFO[] = "--out-fifo=";
-const char optionErrFIFO[] = "--err-fifo=";
-
-void androidLogError(const char* format, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
-
-void androidLogError(const char* format, ...)
-{
- va_list args;
- va_start(args, format);
- __android_log_vprint(ANDROID_LOG_ERROR, "DumpRenderTree", format, args);
- va_end(args);
-}
-
-void removeArg(int index, int* argc, char*** argv)
-{
- for (int i = index; i < *argc; ++i)
- (*argv)[i] = (*argv)[i + 1];
- --*argc;
-}
-
-void createFIFO(const char* fifoPath)
-{
- unlink(fifoPath);
- // 0666 is rw-rw-rw-, to allow adb shell to read/write the fifo.
- // Explicitly call chmod to ensure the mode is set despite umask.
- if (mkfifo(fifoPath, 0666) || chmod(fifoPath, 0666)) {
- androidLogError("Failed to create fifo %s: %s\n", fifoPath, strerror(errno));
- exit(EXIT_FAILURE);
- }
-}
-
-void redirect(FILE* stream, const char* path, const char* mode)
-{
- if (!freopen(path, mode, stream)) {
- androidLogError("Failed to redirect stream to file: %s: %s\n", path, strerror(errno));
- exit(EXIT_FAILURE);
- }
-}
-
} // namespace
void platformInit(int* argc, char*** argv)
@@ -98,38 +51,8 @@ void platformInit(int* argc, char*** argv)
// Initialize skia with customized font config files.
SkUseTestFontConfigFile(fontMainConfigFile, fontFallbackConfigFile, fontsDir);
- const char* inFIFO = 0;
- const char* outFIFO = 0;
- const char* errFIFO = 0;
- for (int i = 1; i < *argc; ) {
- const char* argument = (*argv)[i];
- if (strstr(argument, optionInFIFO) == argument) {
- inFIFO = argument + WTF_ARRAY_LENGTH(optionInFIFO) - 1;
- createFIFO(inFIFO);
- removeArg(i, argc, argv);
- } else if (strstr(argument, optionOutFIFO) == argument) {
- outFIFO = argument + WTF_ARRAY_LENGTH(optionOutFIFO) - 1;
- createFIFO(outFIFO);
- removeArg(i, argc, argv);
- } else if (strstr(argument, optionErrFIFO) == argument) {
- errFIFO = argument + WTF_ARRAY_LENGTH(optionErrFIFO) - 1;
- createFIFO(errFIFO);
- removeArg(i, argc, argv);
- } else
- ++i;
- }
-
- // The order of createFIFO() and redirectToFIFO() is important to avoid deadlock.
- if (outFIFO)
- redirect(stdout, outFIFO, "w");
- if (inFIFO)
- redirect(stdin, inFIFO, "r");
- if (errFIFO)
- redirect(stderr, errFIFO, "w");
- else {
- // Redirect stderr to stdout.
- dup2(1, 2);
- }
+ // Set up IO stream forwarding if necessary.
+ WebKit::maybeInitIOStreamForwardingForAndroid(argc, argv);
// Disable auto hint and use normal hinting in layout test mode to produce the same font metrics as chromium-linux.
WebKit::WebFontRendering::setAutoHint(false);
diff --git a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
index 34d2cc8c0..0929cadf6 100644
--- a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
@@ -776,6 +776,8 @@ void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
propertyName = "enable-webgl";
else if (g_str_equal(originalName.get(), "WebKitWebAudioEnabled"))
propertyName = "enable-webaudio";
+ else if (g_str_equal(originalName.get(), "WebKitDisplayImagesKey"))
+ propertyName = "auto-load-images";
else if (g_str_equal(originalName.get(), "WebKitTabToLinksPreferenceKey")) {
DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(booleanFromValue(valueAsString.get()));
return;
diff --git a/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig b/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
index b6fe75a3f..140714eac 100644
--- a/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
+++ b/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
@@ -37,7 +37,7 @@ GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_VARIABLE = YES
-WARNING_CFLAGS = -Wall -W -Wno-unused-parameter
+WARNING_CFLAGS = -Wall -W -Wno-unused-parameter -Wundef
LINKER_DISPLAYS_MANGLED_NAMES = YES;
CLANG_CXX_LIBRARY = $(CLANG_CXX_LIBRARY_$(TARGET_MAC_OS_X_VERSION_MAJOR));
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
index baa54ed18..ee82454b5 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -153,7 +153,7 @@ static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
static WebHistoryItem *prevTestBFItem = nil; // current b/f item at the end of the previous test
-#if __OBJC2__
+#ifdef __OBJC2__
static void swizzleAllMethods(Class imposter, Class original)
{
unsigned int imposterMethodCount;
@@ -192,7 +192,7 @@ static void poseAsClass(const char* imposter, const char* original)
Class imposterClass = objc_getClass(imposter);
Class originalClass = objc_getClass(original);
-#if !__OBJC2__
+#ifndef __OBJC2__
class_poseAs(imposterClass, originalClass);
#else
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index dd3a22275..baf025aed 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -9,8 +9,7 @@ TEMPLATE = app
TARGET = DumpRenderTree
DESTDIR = $$ROOT_BUILD_DIR/bin
-WEBKIT += wtf webcore
-!v8: WEBKIT += javascriptcore
+WEBKIT += wtf javascriptcore webcore
INCLUDEPATH += \
$$PWD/ \