summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-25 13:02:02 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-25 13:02:02 +0200
commit715be629d51174233403237bfc563cf150087dc8 (patch)
tree4cff72df808db977624338b0a38d8b6d1bd73c57 /Tools
parentdc6262b587c71c14e30d93e57ed812e36a79a33e (diff)
downloadqtwebkit-715be629d51174233403237bfc563cf150087dc8.tar.gz
Imported WebKit commit ce614b0924ba46f78d4435e28ff93c8525fbb7cc (http://svn.webkit.org/repository/webkit/trunk@129485)
New snapshot that includes MingW build fixes
Diffstat (limited to 'Tools')
-rw-r--r--Tools/ChangeLog263
-rw-r--r--Tools/DumpRenderTree/TestRunner.cpp13
-rw-r--r--Tools/DumpRenderTree/TestRunner.h4
-rw-r--r--Tools/DumpRenderTree/blackberry/EventSender.cpp6
-rw-r--r--Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp5
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.cpp10
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.h3
-rw-r--r--Tools/DumpRenderTree/efl/TestRunnerEfl.cpp4
-rw-r--r--Tools/DumpRenderTree/gtk/DumpRenderTree.cpp6
-rw-r--r--Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp6
-rw-r--r--Tools/DumpRenderTree/mac/MockGeolocationProvider.h10
-rw-r--r--Tools/DumpRenderTree/mac/MockGeolocationProvider.mm41
-rw-r--r--Tools/DumpRenderTree/mac/TestRunnerMac.mm7
-rw-r--r--Tools/DumpRenderTree/qt/TestRunnerQt.cpp4
-rw-r--r--Tools/DumpRenderTree/qt/TestRunnerQt.h3
-rw-r--r--Tools/DumpRenderTree/win/TestRunnerWin.cpp4
-rw-r--r--Tools/DumpRenderTree/wx/TestRunnerWx.cpp3
-rwxr-xr-xTools/Scripts/webkitdirs.pm12
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/manager.py19
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py32
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py6
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_results.py4
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py6
-rw-r--r--Tools/WebKitTestRunner/EventSenderProxy.h8
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl3
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp5
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp10
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/TestRunner.h2
-rw-r--r--Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp96
-rw-r--r--Tools/efl/jhbuild.modules1
-rw-r--r--Tools/gtk/jhbuild.modules1
33 files changed, 488 insertions, 115 deletions
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index cbfb08054..d30732d67 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,266 @@
+2012-09-25 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] [DRT] fast/forms/textarea-live-pseudo-selectors.html failed
+ https://bugs.webkit.org/show_bug.cgi?id=97189
+
+ Reviewed by Rob Buis.
+
+ Translate ASCII key code to BlackBerry key code for BACKSPACE and DELETE key.
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (keyDownCallback):
+
+2012-09-25 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WTR bundle client loads binary data as text
+ https://bugs.webkit.org/show_bug.cgi?id=97532
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ WTR::InjectedBundlePage::decidePolicyForResponse now checks response MIME type
+ and returns WKBundlePagePolicyActionPassThrough if it cannot be shown.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::decidePolicyForResponse):
+
+2012-09-25 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed, another test case adjustment after r129459. Python 2.7 doesn't
+ seem to be a requirement yet so the assertDictEqual method is not yet available
+ on all builders. Assert that the empty dictionary length equals 0 instead.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ResultSummaryTest.test_interpret_test_failures):
+
+2012-09-24 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix build with latest Qt 5
+ https://bugs.webkit.org/show_bug.cgi?id=97479
+
+ Reviewed by Tor Arne Vestbø.
+
+ The variables for syncqt handling are now set in api.pri, but let's add a comment here that we can
+ remove them from default_pre.prf once we're past Qt 5 beta2.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-09-25 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed, adjusting the test cases after r129459. The JSON data
+ for reftests now contains the 'reftest_type' key and no more 'is_reftest'
+ or 'is_mismatch_reftest' keys.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (EndToEndTest.test_reftest_with_two_notrefs):
+
+2012-09-24 Zan Dobersek <zandobersek@gmail.com>
+
+ Unexpected reftest passes are only reported when pixel testing is enabled in results.html as well
+ https://bugs.webkit.org/show_bug.cgi?id=97426
+
+ Reviewed by Ojan Vafai.
+
+ The 'is_reftest' member of the TestResult class has been replaced by the reftest_type
+ member which is a set containing either '!=', '==', both or none if the test represented
+ by the object is not a reftest.
+
+ When summarizing results, the test dictionary is updated to contain the 'reftest_type' key
+ if the test is a reftest. The value of this key is a list of all the reftest types of this test.
+
+ The test failure interpretation method has been refactored, it now reports only
+ missing results of various formats and image diff percent in case of image or
+ reftest mismatch.
+
+ Unit tests have been modified accordingly.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner._update_summary_with_result):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (LayoutTestRunnerTests.test_update_summary_with_result):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (interpret_test_failures):
+ (summarize_results):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ResultSummaryTest.test_interpret_test_failures):
+ * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
+ (SingleTestRunner.run):
+ (SingleTestRunner._run_reftest):
+ * Scripts/webkitpy/layout_tests/models/test_results.py:
+ (TestResult.__init__):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (EndToEndTest.test_reftest_with_two_notrefs):
+
+2012-09-24 Sam Weinig <sam@webkit.org>
+
+ Use NSUserDefaults rather than an environment variable to control whether to use an XPC Service for the WebProcess
+ https://bugs.webkit.org/show_bug.cgi?id=97514
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/webkitdirs.pm:
+ (argumentsForRunAndDebugMacWebKitApp):
+ Push "-WebKit2UseXPCServiceForWebProcess YES" as arguments when --use-web-process-xpc-service
+ is provided to set the user default. Move adding of @ARGV to after custom additions as calling
+ shouldUseXPCServiceForWebProcess() can change @ARGV.
+
+ (runMacWebKitApp):
+ (execMacWebKitAppForDebugging):
+ Stop setting the WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS environment variable.
+
+2012-09-24 Laszlo Gombos <l.gombos@samsung.com>
+
+ [GTK][EFL] Make sure cairo is built with fontconfig support
+ https://bugs.webkit.org/show_bug.cgi?id=97513
+
+ Reviewed by Martin Robinson.
+
+ The GTK and EFL port of WebKit requires a version of cairo that is built with fontconfig support.
+
+ * efl/jhbuild.modules:
+ * gtk/jhbuild.modules:
+
+2012-09-24 Benjamin Poulain <bpoulain@apple.com>
+
+ Fix Geolocation error reporting in the test support
+ https://bugs.webkit.org/show_bug.cgi?id=97386
+
+ Reviewed by Sam Weinig.
+ The TestRunner was exposing internal implementation details of
+ the Geolocation object through setMockGeolocationError().
+
+ In practice, only the error code PositionUnavailable is supported
+ or even implemented.
+
+ Exposing setMockGeolocationError() does not make sense for WebKit2 as
+ passing generic errors from the UIProcess is a bad idea. This is the
+ opportunity to clean TestRunner and prepare and interface suitable for WebKit2.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (setMockGeolocationPositionUnavailableErrorCallback):
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/mac/MockGeolocationProvider.h:
+ * DumpRenderTree/mac/MockGeolocationProvider.mm:
+ (-[MockGeolocationProvider dealloc]):
+ (-[MockGeolocationProvider resetError]):
+ (-[MockGeolocationProvider setPosition:]):
+ (-[MockGeolocationProvider setPositionUnavailableErrorWithMessage:]):
+ (-[MockGeolocationProvider lastPosition]):
+ (-[MockGeolocationProvider timerFired]):
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+
+2012-09-24 Nikhil Bansal <n.bansal@samsung.com>
+
+ [EFL][WK2] TestRunner needs touch events support.
+ https://bugs.webkit.org/show_bug.cgi?id=96465
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Simulate touch events in WebkitTestRunner for touch related
+ layout tests. This patch uses ewk_view_feed_touch_event() to
+ generate touch events.
+
+ * WebKitTestRunner/EventSenderProxy.h:
+ (EventSenderProxy):
+ * WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
+ (WTR):
+ (WTR::setEvasModifiers):
+ (WTR::EventSenderProxy::EventSenderProxy):
+ (WTR::EventSenderProxy::~EventSenderProxy):
+ (WTR::EventSenderProxy::sendTouchEvent):
+ (WTR::EventSenderProxy::addTouchPoint):
+ (WTR::EventSenderProxy::updateTouchPoint):
+ (WTR::EventSenderProxy::setTouchModifier):
+ (WTR::EventSenderProxy::touchStart):
+ (WTR::EventSenderProxy::touchMove):
+ (WTR::EventSenderProxy::touchEnd):
+ (WTR::EventSenderProxy::touchCancel):
+ (WTR::EventSenderProxy::clearTouchPoints):
+ (WTR::EventSenderProxy::releaseTouchPoint):
+ (WTR::EventSenderProxy::cancelTouchPoint):
+
+2012-09-24 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2] TestRunner does not support overridePreference with value "0"
+ https://bugs.webkit.org/show_bug.cgi?id=97457
+
+ Reviewed by Alexey Proskuryakov.
+
+ testRunner.overridePreference() was marked as taking a boolean
+ in argument in testRunner.idl even though the test cases are
+ passing strings to it. The current code works if the test
+ case wants to enable a setting and therefore passes "1" string.
+ However, if the test wants to disable a setting and passes "0"
+ string, the current code also evaluates this to true causing
+ certain test cases to fail.
+
+ The argument to testRunner.overridePreference() is now of string
+ type and a function has been added to convert the string passed
+ by the test to a boolean value.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::toBool):
+ (WTR):
+ (WTR::TestRunner::overridePreference):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-09-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r129343.
+ http://trac.webkit.org/changeset/129343
+ https://bugs.webkit.org/show_bug.cgi?id=97479
+
+ It broke the build (Requested by Ossy_NIGHT on #webkit).
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-09-24 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk] Unskip the Shadow DOM layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=90776
+
+ Reviewed by Ryosuke Niwa.
+
+ Enable Shadow DOM through DumpRenderTreeSupport when resetting defaults in between tests.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+
+2012-09-24 Zan Dobersek <zandobersek@gmail.com>
+
+ REGRESSION (r129211-r129218): http/tests/loading/redirect-with-no-location-crash.html failing on GTK Linux 64-bit Release WK2 (Tests)
+ https://bugs.webkit.org/show_bug.cgi?id=97404
+
+ Reviewed by Philippe Normand.
+
+ Print out the 'didReceiveTitle' information when dumping frame load callbacks.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (webViewTitleChanged):
+
2012-09-24 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Fix build with latest Qt 5
diff --git a/Tools/DumpRenderTree/TestRunner.cpp b/Tools/DumpRenderTree/TestRunner.cpp
index 1d00c50a3..9f7a7c1be 100644
--- a/Tools/DumpRenderTree/TestRunner.cpp
+++ b/Tools/DumpRenderTree/TestRunner.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserved.
* Copyright (C) 2010 Joone Hur <joone@kldp.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -1095,17 +1095,16 @@ static JSValueRef setMockGeolocationPositionCallback(JSContextRef context, JSObj
return JSValueMakeUndefined(context);
}
-static JSValueRef setMockGeolocationErrorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef setMockGeolocationPositionUnavailableErrorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- if (argumentCount < 2)
+ if (argumentCount != 1)
return JSValueMakeUndefined(context);
- int code = JSValueToNumber(context, arguments[0], NULL);
- JSRetainPtr<JSStringRef> message(Adopt, JSValueToStringCopy(context, arguments[1], exception));
+ JSRetainPtr<JSStringRef> message(Adopt, JSValueToStringCopy(context, arguments[0], exception));
ASSERT(!*exception);
TestRunner* controller = reinterpret_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setMockGeolocationError(code, message.get());
+ controller->setMockGeolocationPositionUnavailableError(message.get());
return JSValueMakeUndefined(context);
}
@@ -2266,7 +2265,7 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMinimumTimerInterval", setMinimumTimerIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockDeviceOrientation", setMockDeviceOrientationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setMockGeolocationError", setMockGeolocationErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setMockGeolocationPositionUnavailableError", setMockGeolocationPositionUnavailableErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockGeolocationPosition", setMockGeolocationPositionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "addMockSpeechInputResult", addMockSpeechInputResultCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockSpeechInputDumpRect", setMockSpeechInputDumpRectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/Tools/DumpRenderTree/TestRunner.h b/Tools/DumpRenderTree/TestRunner.h
index 9bcc95bc9..edd0dfda7 100644
--- a/Tools/DumpRenderTree/TestRunner.h
+++ b/Tools/DumpRenderTree/TestRunner.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -100,8 +100,8 @@ public:
void setAutomaticLinkDetectionEnabled(bool flag);
void setMainFrameIsFirstResponder(bool flag);
void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
- void setMockGeolocationError(int code, JSStringRef message);
void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
+ void setMockGeolocationPositionUnavailableError(JSStringRef message);
void addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language);
void setMockSpeechInputDumpRect(bool flag);
void setPersistentUserStyleSheetLocation(JSStringRef path);
diff --git a/Tools/DumpRenderTree/blackberry/EventSender.cpp b/Tools/DumpRenderTree/blackberry/EventSender.cpp
index 1d5f0fe4d..5c30ea408 100644
--- a/Tools/DumpRenderTree/blackberry/EventSender.cpp
+++ b/Tools/DumpRenderTree/blackberry/EventSender.cpp
@@ -140,7 +140,11 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
charCode = KEYCODE_BACKSPACE;
else {
charCode = JSStringGetCharactersPtr(character)[0];
- if (WTF::isASCIIUpper(charCode))
+ if (0x8 == charCode)
+ charCode = KEYCODE_BACKSPACE;
+ else if (0x7F == charCode)
+ charCode = KEYCODE_DELETE;
+ else if (WTF::isASCIIUpper(charCode))
needsShiftKeyModifier = true;
}
JSStringRelease(character);
diff --git a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
index 8986900c6..62be5fe18 100644
--- a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
+++ b/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009, 2010, 2012 Research In Motion Limited. All rights reserved.
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -449,10 +450,10 @@ void TestRunner::setMockGeolocationPosition(double latitude, double longitude, d
DumpRenderTreeSupport::setMockGeolocationPosition(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), latitude, longitude, accuracy);
}
-void TestRunner::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
String messageStr = jsStringRefToWebCoreString(message);
- DumpRenderTreeSupport::setMockGeolocationError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), code, messageStr);
+ DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), messageStr);
}
void TestRunner::showWebInspector()
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
index 0e5a8b31b..f4f3aed22 100644
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
+++ b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -206,7 +207,7 @@ DRTTestRunner::DRTTestRunner(TestShell* shell)
bindMethod("setJavaScriptCanAccessClipboard", &DRTTestRunner::setJavaScriptCanAccessClipboard);
bindMethod("setMinimumTimerInterval", &DRTTestRunner::setMinimumTimerInterval);
bindMethod("setMockDeviceOrientation", &DRTTestRunner::setMockDeviceOrientation);
- bindMethod("setMockGeolocationError", &DRTTestRunner::setMockGeolocationError);
+ bindMethod("setMockGeolocationPositionUnavailableError", &DRTTestRunner::setMockGeolocationPositionUnavailableError);
bindMethod("setMockGeolocationPosition", &DRTTestRunner::setMockGeolocationPosition);
bindMethod("setPageVisibility", &DRTTestRunner::setPageVisibility);
bindMethod("setPluginsEnabled", &DRTTestRunner::setPluginsEnabled);
@@ -1816,14 +1817,15 @@ void DRTTestRunner::setMockGeolocationPosition(const CppArgumentList& arguments,
windowList[i]->geolocationClientMock()->setPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
}
-void DRTTestRunner::setMockGeolocationError(const CppArgumentList& arguments, CppVariant* result)
+void DRTTestRunner::setMockGeolocationPositionUnavailableError(const CppArgumentList& arguments, CppVariant* result)
{
result->setNull();
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
+ if (arguments.size() != 1 || !arguments[0].isString())
return;
Vector<WebViewHost*> windowList = m_shell->windowList();
+ // FIXME: Benjamin
for (size_t i = 0; i < windowList.size(); i++)
- windowList[i]->geolocationClientMock()->setError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
+ windowList[i]->geolocationClientMock()->setPositionUnavailableError(cppVariantToWebString(arguments[0]));
}
void DRTTestRunner::abortModal(const CppArgumentList& arguments, CppVariant* result)
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.h b/Tools/DumpRenderTree/chromium/DRTTestRunner.h
index b6c907e62..55940acd1 100644
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.h
+++ b/Tools/DumpRenderTree/chromium/DRTTestRunner.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -337,7 +338,7 @@ public:
// Geolocation related functions.
void setGeolocationPermission(const CppArgumentList&, CppVariant*);
void setMockGeolocationPosition(const CppArgumentList&, CppVariant*);
- void setMockGeolocationError(const CppArgumentList&, CppVariant*);
+ void setMockGeolocationPositionUnavailableError(const CppArgumentList&, CppVariant*);
// Empty stub method to keep parity with object model exposed by global DRTTestRunner.
void abortModal(const CppArgumentList&, CppVariant*);
diff --git a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp b/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
index 2e380c569..9797a3152 100644
--- a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
+++ b/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2012 Apple Inc. All rights reserved.
* Copyright (C) 2007 Eric Seidel <eric@webkit.org>
* Copyright (C) 2008 Nuanti Ltd.
* Copyright (C) 2009 Jan Michael Alonzo <jmalonzo@gmail.com>
@@ -379,7 +379,7 @@ void TestRunner::setMockGeolocationPosition(double, double, double)
notImplemented();
}
-void TestRunner::setMockGeolocationError(int, JSStringRef)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef)
{
// FIXME: Implement for Geolocation layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=28264.
diff --git a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
index ad27436c2..a6c438399 100644
--- a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -516,6 +516,7 @@ static void resetDefaultsToConsistentValues()
DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled(webView, false);
DumpRenderTreeSupportGtk::setCSSRegionsEnabled(webView, true);
+ DumpRenderTreeSupportGtk::setShadowDOMEnabled(true);
}
static bool useLongRunningServerMode(int argc, char *argv[])
@@ -943,6 +944,11 @@ static gboolean webViewScriptConfirm(WebKitWebView* view, WebKitWebFrame* frame,
static void webViewTitleChanged(WebKitWebView* view, WebKitWebFrame* frame, const gchar* title, gpointer data)
{
+ if (gTestRunner->dumpFrameLoadCallbacks() && !done) {
+ GOwnPtr<char> frameName(getFrameNameSuitableForTestResult(view, frame));
+ printf("%s - didReceiveTitle: %s\n", frameName.get(), title ? title : "");
+ }
+
if (gTestRunner->dumpTitleChanges() && !done)
printf("TITLE CHANGED: '%s'\n", title ? title : "");
}
diff --git a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
index 0929cadf6..db9628927 100644
--- a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2012 Apple Inc. All rights reserved.
* Copyright (C) 2007 Eric Seidel <eric@webkit.org>
* Copyright (C) 2008 Nuanti Ltd.
* Copyright (C) 2009 Jan Michael Alonzo <jmalonzo@gmail.com>
@@ -447,7 +447,7 @@ void TestRunner::setMockGeolocationPosition(double latitude, double longitude, d
DumpRenderTreeSupportGtk::setMockGeolocationPosition(view, latitude, longitude, accuracy);
}
-void TestRunner::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
WebKitWebView* view = WEBKIT_WEB_VIEW(g_slist_nth_data(webViewList, 0));
if (!view)
@@ -455,7 +455,7 @@ void TestRunner::setMockGeolocationError(int code, JSStringRef message)
ASSERT(view);
GOwnPtr<gchar> cMessage(JSStringCopyUTF8CString(message));
- DumpRenderTreeSupportGtk::setMockGeolocationError(view, code, cMessage.get());
+ DumpRenderTreeSupportGtk::setMockGeolocationPositionUnavailableError(view, cMessage.get());
}
void TestRunner::setGeolocationPermission(bool allow)
diff --git a/Tools/DumpRenderTree/mac/MockGeolocationProvider.h b/Tools/DumpRenderTree/mac/MockGeolocationProvider.h
index 311d1e918..ba3a842a9 100644
--- a/Tools/DumpRenderTree/mac/MockGeolocationProvider.h
+++ b/Tools/DumpRenderTree/mac/MockGeolocationProvider.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010, 2012 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,10 +28,12 @@
#import <WebKit/WebViewPrivate.h>
#import <wtf/HashSet.h>
+#import <wtf/RetainPtr.h>
@interface MockGeolocationProvider : NSObject<WebGeolocationProvider> {
- WebGeolocationPosition *_lastPosition;
- NSError *_error;
+ RetainPtr<WebGeolocationPosition> _lastPosition;
+ BOOL _hasError;
+ RetainPtr<NSString> _errorMessage;
NSTimer *_timer;
HashSet<WebView *> _registeredViews;
}
@@ -39,7 +41,7 @@
+ (MockGeolocationProvider *)shared;
- (void)setPosition:(WebGeolocationPosition *)position;
-- (void)setError:(NSError *)error;
+- (void)setPositionUnavailableErrorWithMessage:(NSString *)errorMessage;
- (void)stopTimer;
diff --git a/Tools/DumpRenderTree/mac/MockGeolocationProvider.mm b/Tools/DumpRenderTree/mac/MockGeolocationProvider.mm
index e03cae24a..5156d5186 100644
--- a/Tools/DumpRenderTree/mac/MockGeolocationProvider.mm
+++ b/Tools/DumpRenderTree/mac/MockGeolocationProvider.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2010, 2012 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -38,34 +38,33 @@
{
ASSERT(_registeredViews.isEmpty());
- [_lastPosition release];
- [_error release];
+ _lastPosition.clear();
+ _errorMessage.clear();
[super dealloc];
}
+- (void)resetError
+{
+ _hasError = NO;
+ _errorMessage.clear();
+}
+
- (void)setPosition:(WebGeolocationPosition *)position
{
- if (_lastPosition != position) {
- [_lastPosition release];
- _lastPosition = [position retain];
- }
+ _lastPosition = position;
- [_error release];
- _error = 0;
+ [self resetError];
if (!_timer)
_timer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(timerFired) userInfo:0 repeats:NO];
}
-- (void)setError:(NSError *)error
+- (void)setPositionUnavailableErrorWithMessage:(NSString *)errorMessage
{
- if (_error != error) {
- [_error release];
- _error = [error retain];
- }
-
- [_lastPosition release];
- _lastPosition = 0;
+ _hasError = YES;
+ _errorMessage = errorMessage;
+
+ _lastPosition.clear();
if (!_timer)
_timer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(timerFired) userInfo:0 repeats:NO];
@@ -86,7 +85,7 @@
- (WebGeolocationPosition *)lastPosition
{
- return _lastPosition;
+ return _lastPosition.get();
}
- (void)stopTimer
@@ -102,10 +101,10 @@
// Expect that views won't be (un)registered while iterating.
HashSet<WebView*> views = _registeredViews;
for (HashSet<WebView*>::iterator iter = views.begin(); iter != views.end(); ++iter) {
- if (_error)
- [*iter _geolocationDidFailWithError:_error];
+ if (_hasError)
+ [*iter _geolocationDidFailWithMessage:_errorMessage.get()];
else
- [*iter _geolocationDidChangePosition:_lastPosition];
+ [*iter _geolocationDidChangePosition:_lastPosition.get()];
}
}
diff --git a/Tools/DumpRenderTree/mac/TestRunnerMac.mm b/Tools/DumpRenderTree/mac/TestRunnerMac.mm
index a21ed80ac..1a0a04dc7 100644
--- a/Tools/DumpRenderTree/mac/TestRunnerMac.mm
+++ b/Tools/DumpRenderTree/mac/TestRunnerMac.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009, 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -479,12 +479,11 @@ void TestRunner::setMockGeolocationPosition(double latitude, double longitude, d
[position release];
}
-void TestRunner::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
RetainPtr<CFStringRef> messageCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, message));
NSString *messageNS = (NSString *)messageCF.get();
- NSError *error = [NSError errorWithDomain:WebKitErrorDomain code:code userInfo:[NSDictionary dictionaryWithObject:messageNS forKey:NSLocalizedDescriptionKey]];
- [[MockGeolocationProvider shared] setError:error];
+ [[MockGeolocationProvider shared] setPositionUnavailableErrorWithMessage:messageNS];
}
void TestRunner::setGeolocationPermission(bool allow)
diff --git a/Tools/DumpRenderTree/qt/TestRunnerQt.cpp b/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
index d3503bd1e..9a92013ed 100644
--- a/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
+++ b/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
@@ -834,11 +834,11 @@ void TestRunner::setGeolocationPermissionCommon(bool allow)
m_geolocationPermission = allow;
}
-void TestRunner::setMockGeolocationError(int code, const QString& message)
+void TestRunner::setMockGeolocationPositionUnavailableError(const QString& message)
{
QList<WebCore::WebPage*> pages = m_drt->getAllPages();
foreach (WebCore::WebPage* page, pages)
- DumpRenderTreeSupportQt::setMockGeolocationError(page, code, message);
+ DumpRenderTreeSupportQt::setMockGeolocationPositionUnavailableError(page, message);
}
void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
diff --git a/Tools/DumpRenderTree/qt/TestRunnerQt.h b/Tools/DumpRenderTree/qt/TestRunnerQt.h
index 88a9c6a94..311bcd9de 100644
--- a/Tools/DumpRenderTree/qt/TestRunnerQt.h
+++ b/Tools/DumpRenderTree/qt/TestRunnerQt.h
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -224,7 +225,7 @@ public Q_SLOTS:
void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
- void setMockGeolocationError(int code, const QString& message);
+ void setMockGeolocationPositionUnavailableError(const QString& message);
void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
void setGeolocationPermission(bool allow);
int numberOfPendingGeolocationPermissionRequests();
diff --git a/Tools/DumpRenderTree/win/TestRunnerWin.cpp b/Tools/DumpRenderTree/win/TestRunnerWin.cpp
index d33651b7a..c4400fdcb 100644
--- a/Tools/DumpRenderTree/win/TestRunnerWin.cpp
+++ b/Tools/DumpRenderTree/win/TestRunnerWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -420,7 +420,7 @@ void TestRunner::setMockGeolocationPosition(double latitude, double longitude, d
// See https://bugs.webkit.org/show_bug.cgi?id=28264.
}
-void TestRunner::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
// FIXME: Implement for Geolocation layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=28264.
diff --git a/Tools/DumpRenderTree/wx/TestRunnerWx.cpp b/Tools/DumpRenderTree/wx/TestRunnerWx.cpp
index d7a5252c4..e780cfe52 100644
--- a/Tools/DumpRenderTree/wx/TestRunnerWx.cpp
+++ b/Tools/DumpRenderTree/wx/TestRunnerWx.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -338,7 +339,7 @@ void TestRunner::setMockGeolocationPosition(double latitude, double longitude, d
// See https://bugs.webkit.org/show_bug.cgi?id=28264.
}
-void TestRunner::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef)
{
// FIXME: Implement for Geolocation layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=28264.
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index af4b64db2..7060d2def 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -2527,8 +2527,11 @@ EOF
sub argumentsForRunAndDebugMacWebKitApp()
{
- my @args = @ARGV;
+ my @args = ();
push @args, ("-ApplePersistenceIgnoreState", "YES") if !isSnowLeopard() && checkForArgumentAndRemoveFromArrayRef("--no-saved-state", \@args);
+ push @args, ("-WebKit2UseXPCServiceForWebProcess", "YES") if shouldUseXPCServiceForWebProcess();
+ unshift @args, @ARGV;
+
return @args;
}
@@ -2542,10 +2545,6 @@ sub runMacWebKitApp($;$)
setUpGuardMallocIfNeeded();
- if (shouldUseXPCServiceForWebProcess()) {
- $ENV{WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS} = "YES";
- }
-
if (defined($useOpenCommand) && $useOpenCommand == USE_OPEN_COMMAND) {
return system("open", "-W", "-a", $appPath, "--args", argumentsForRunAndDebugMacWebKitApp());
}
@@ -2583,9 +2582,6 @@ sub execMacWebKitAppForDebugging($)
my @architectureFlags = ($architectureSwitch, architecture());
if (!shouldTargetWebProcess()) {
- if (shouldUseXPCServiceForWebProcess()) {
- $ENV{WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS} = "YES";
- }
print "Starting @{[basename($appPath)]} under $debugger with DYLD_FRAMEWORK_PATH set to point to built WebKit in $productDir.\n";
exec { $debuggerPath } $debuggerPath, @architectureFlags, $argumentsSeparator, $appPath, argumentsForRunAndDebugMacWebKitApp() or die;
} else {
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
index 69d2cc030..420128619 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
@@ -198,7 +198,7 @@ class LayoutTestRunner(object):
exp_str = got_str = 'SKIP'
expected = True
else:
- expected = self._expectations.matches_an_expected_result(result.test_name, result.type, self._options.pixel_tests or result.is_reftest)
+ expected = self._expectations.matches_an_expected_result(result.test_name, result.type, self._options.pixel_tests or result.reftest_type)
exp_str = self._expectations.get_expectations_string(result.test_name)
got_str = self._expectations.expectation_to_string(result.type)
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
index 5062d5277..4efa4e00c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
@@ -152,13 +152,13 @@ class LayoutTestRunnerTests(unittest.TestCase):
runner._expectations = expectations
result_summary = ResultSummary(expectations, [test], 1, set())
- result = TestResult(test_name=test, failures=[test_failures.FailureReftestMismatchDidNotOccur()], is_reftest=True)
+ result = TestResult(test_name=test, failures=[test_failures.FailureReftestMismatchDidNotOccur()], reftest_type=['!='])
runner._update_summary_with_result(result_summary, result)
self.assertEquals(1, result_summary.expected)
self.assertEquals(0, result_summary.unexpected)
result_summary = ResultSummary(expectations, [test], 1, set())
- result = TestResult(test_name=test, failures=[], is_reftest=True)
+ result = TestResult(test_name=test, failures=[], reftest_type=['=='])
runner._update_summary_with_result(result_summary, result)
self.assertEquals(0, result_summary.expected)
self.assertEquals(1, result_summary.unexpected)
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
index e6924a3ee..d06ed7153 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -75,7 +75,7 @@ def interpret_test_failures(port, test_name, failures):
test_name: test name relative to layout_tests directory
failures: list of test failures
Returns:
- A dictionary like {'is_reftest': True, ...}
+ A dictionary like {'is_missing_text': True, ...}
"""
test_dict = {}
failure_types = [type(failure) for failure in failures]
@@ -84,20 +84,16 @@ def interpret_test_failures(port, test_name, failures):
if test_failures.FailureMissingAudio in failure_types:
test_dict['is_missing_audio'] = True
- for failure in failures:
- if isinstance(failure, test_failures.FailureImageHashMismatch):
- test_dict['image_diff_percent'] = failure.diff_percent
- elif isinstance(failure, test_failures.FailureReftestMismatch):
- test_dict['is_reftest'] = True
- test_dict['image_diff_percent'] = failure.diff_percent
- elif isinstance(failure, test_failures.FailureReftestMismatchDidNotOccur):
- test_dict['is_mismatch_reftest'] = True
-
if test_failures.FailureMissingResult in failure_types:
test_dict['is_missing_text'] = True
if test_failures.FailureMissingImage in failure_types or test_failures.FailureMissingImageHash in failure_types:
test_dict['is_missing_image'] = True
+
+ for failure in failures:
+ if isinstance(failure, test_failures.FailureImageHashMismatch) or isinstance(failure, test_failures.FailureReftestMismatch):
+ test_dict['image_diff_percent'] = failure.diff_percent
+
return test_dict
@@ -172,6 +168,9 @@ def summarize_results(port_obj, expectations, result_summary, retry_summary, tes
if result.has_stderr:
test_dict['has_stderr'] = True
+ if result.reftest_type:
+ test_dict.update(reftest_type=list(result.reftest_type))
+
if expectations.has_modifier(test_name, test_expectations.WONTFIX):
test_dict['wontfix'] = True
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
index dcd24a446..e94d1332b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
@@ -104,24 +104,32 @@ class ResultSummaryTest(unittest.TestCase):
def test_interpret_test_failures(self):
test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
- [test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/reftest-expected.html'))])
- self.assertTrue('is_reftest' in test_dict)
- self.assertFalse('is_mismatch_reftest' in test_dict)
+ [test_failures.FailureImageHashMismatch(diff_percent=0.42)])
+ self.assertEqual(test_dict['image_diff_percent'], 0.42)
test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
- [test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/common.html'))])
- self.assertTrue('is_reftest' in test_dict)
- self.assertFalse('is_mismatch_reftest' in test_dict)
+ [test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/reftest-expected.html'))])
+ self.assertTrue('image_diff_percent' in test_dict)
test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
[test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/reftest-expected-mismatch.html'))])
- self.assertFalse('is_reftest' in test_dict)
- self.assertTrue(test_dict['is_mismatch_reftest'])
+ self.assertEqual(len(test_dict), 0)
- test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
- [test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/common.html'))])
- self.assertFalse('is_reftest' in test_dict)
- self.assertTrue(test_dict['is_mismatch_reftest'])
+ test_dict = interpret_test_failures(self.port, 'foo/audio-test.html',
+ [test_failures.FailureMissingAudio()])
+ self.assertTrue('is_missing_audio' in test_dict)
+
+ test_dict = interpret_test_failures(self.port, 'foo/text-test.html',
+ [test_failures.FailureMissingResult()])
+ self.assertTrue('is_missing_text' in test_dict)
+
+ test_dict = interpret_test_failures(self.port, 'foo/pixel-test.html',
+ [test_failures.FailureMissingImage()])
+ self.assertTrue('is_missing_image' in test_dict)
+
+ test_dict = interpret_test_failures(self.port, 'foo/pixel-test.html',
+ [test_failures.FailureMissingImageHash()])
+ self.assertTrue('is_missing_image' in test_dict)
def get_result(self, test_name, result_type=test_expectations.PASS, run_time=0):
failures = []
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
index 09b4e1d9f..0cb7aefec 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
@@ -94,7 +94,8 @@ class SingleTestRunner(object):
def run(self):
if self._reference_files:
if self._port.get_option('no_ref_tests') or self._options.reset_results:
- result = TestResult(self._test_name, is_reftest=True)
+ reftest_type = set([reference_file[0] for reference_file in self._reference_files])
+ result = TestResult(self._test_name, reftest_type=reftest_type)
result.type = test_expectations.SKIP
return result
return self._run_reftest()
@@ -303,7 +304,8 @@ class SingleTestRunner(object):
assert(reference_output)
test_result_writer.write_test_result(self._filesystem, self._port, self._test_name, test_output, reference_output, test_result.failures)
- return TestResult(self._test_name, test_result.failures, total_test_time + test_result.test_run_time, test_result.has_stderr, is_reftest=True)
+ reftest_type = set([reference_file[0] for reference_file in self._reference_files])
+ return TestResult(self._test_name, test_result.failures, total_test_time + test_result.test_run_time, test_result.has_stderr, reftest_type=reftest_type)
def _compare_output_with_reference(self, reference_driver_output, actual_driver_output, reference_filename, mismatch):
total_test_time = reference_driver_output.test_time + actual_driver_output.test_time
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_results.py b/Tools/Scripts/webkitpy/layout_tests/models/test_results.py
index d6c83014a..6b9db5587 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_results.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_results.py
@@ -38,12 +38,12 @@ class TestResult(object):
def loads(string):
return cPickle.loads(string)
- def __init__(self, test_name, failures=None, test_run_time=None, has_stderr=False, is_reftest=False):
+ def __init__(self, test_name, failures=None, test_run_time=None, has_stderr=False, reftest_type=[]):
self.test_name = test_name
self.failures = failures or []
self.test_run_time = test_run_time or 0
self.has_stderr = has_stderr
- self.is_reftest = is_reftest
+ self.reftest_type = reftest_type
# FIXME: Setting this in the constructor makes this class hard to mutate.
self.type = test_failures.determine_result_type(failures)
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
index 5e6e422eb..4afcc1466 100755
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
@@ -964,11 +964,11 @@ class EndToEndTest(unittest.TestCase):
self.assertTrue("multiple-mismatch-success.html" not in json["tests"]["reftests"]["foo"])
self.assertTrue("multiple-both-success.html" not in json["tests"]["reftests"]["foo"])
self.assertEqual(json["tests"]["reftests"]["foo"]["multiple-match-failure.html"],
- {"expected": "PASS", "actual": "IMAGE", "image_diff_percent": 1, 'is_reftest': True})
+ {"expected": "PASS", "actual": "IMAGE", "reftest_type": ["=="], "image_diff_percent": 1})
self.assertEqual(json["tests"]["reftests"]["foo"]["multiple-mismatch-failure.html"],
- {"expected": "PASS", "actual": "IMAGE", "is_mismatch_reftest": True})
+ {"expected": "PASS", "actual": "IMAGE", "reftest_type": ["!="]})
self.assertEqual(json["tests"]["reftests"]["foo"]["multiple-both-failure.html"],
- {"expected": "PASS", "actual": "IMAGE", "is_mismatch_reftest": True})
+ {"expected": "PASS", "actual": "IMAGE", "reftest_type": ["==", "!="]})
class RebaselineTest(unittest.TestCase, StreamTestingMixin):
diff --git a/Tools/WebKitTestRunner/EventSenderProxy.h b/Tools/WebKitTestRunner/EventSenderProxy.h
index 2e84c571e..ce2c1a612 100644
--- a/Tools/WebKitTestRunner/EventSenderProxy.h
+++ b/Tools/WebKitTestRunner/EventSenderProxy.h
@@ -34,6 +34,7 @@
#include <gdk/gdk.h>
#include <wtf/Vector.h>
#elif PLATFORM(EFL)
+#include <WebKit2/EWebKit2.h>
#include <wtf/Deque.h>
#endif
@@ -50,6 +51,7 @@ struct WTREvent;
class EventSenderProxy {
public:
explicit EventSenderProxy(TestController*);
+ ~EventSenderProxy();
void mouseDown(unsigned button, WKEventModifiers);
void mouseUp(unsigned button, WKEventModifiers);
@@ -97,6 +99,9 @@ private:
#elif PLATFORM(EFL)
void sendOrQueueEvent(const WTREvent&);
void dispatchEvent(const WTREvent&);
+#if ENABLE(TOUCH_EVENTS)
+ void sendTouchEvent(Ewk_Touch_Event_Type);
+#endif
#endif
double m_time;
@@ -123,6 +128,9 @@ private:
#elif PLATFORM(EFL)
Deque<WTREvent> m_eventQueue;
unsigned m_mouseButton;
+#if ENABLE(TOUCH_EVENTS)
+ Eina_List* m_touchPoints;
+#endif
#endif
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
index 5b177d5bc..35af514fe 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
@@ -160,8 +160,7 @@ module WTR {
// Cookies testing
void setAlwaysAcceptCookies(in boolean accept);
- // FIXME: handle non-boolean preferences.
- void overridePreference(in DOMString preference, in boolean value);
+ void overridePreference(in DOMString preference, in DOMString value);
// Page Visibility API
void setPageVisibility(in DOMString state);
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 689e381c3..ab579c41b 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -1319,9 +1319,10 @@ WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNewWindowAction(WKBu
return WKBundlePagePolicyActionUse;
}
-WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForResponse(WKBundlePageRef, WKBundleFrameRef, WKURLResponseRef, WKURLRequestRef, WKTypeRef*)
+WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForResponse(WKBundlePageRef page, WKBundleFrameRef, WKURLResponseRef response, WKURLRequestRef, WKTypeRef*)
{
- return WKBundlePagePolicyActionUse;
+ WKRetainPtr<WKStringRef> mimeType = adoptWK(WKURLResponseCopyMIMEType(response));
+ return WKBundlePageCanShowMIMEType(page, mimeType.get()) ? WKBundlePagePolicyActionUse : WKBundlePagePolicyActionPassThrough;
}
void InjectedBundlePage::unableToImplementPolicy(WKBundlePageRef, WKBundleFrameRef, WKErrorRef, WKTypeRef*)
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
index 13c18388b..e2ef1557c 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
@@ -649,9 +649,15 @@ void TestRunner::callSetBackingScaleFactorCallback()
callTestRunnerCallback(SetBackingScaleFactorCallbackID);
}
-void TestRunner::overridePreference(JSStringRef preference, bool value)
+static inline bool toBool(JSStringRef value)
{
- WKBundleOverrideBoolPreferenceForTestRunner(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), toWK(preference).get(), value);
+ return JSStringIsEqualToUTF8CString(value, "true") || JSStringIsEqualToUTF8CString(value, "1");
+}
+
+void TestRunner::overridePreference(JSStringRef preference, JSStringRef value)
+{
+ // FIXME: handle non-boolean preferences.
+ WKBundleOverrideBoolPreferenceForTestRunner(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), toWK(preference).get(), toBool(value));
}
void TestRunner::sendWebIntentResponse(JSStringRef reply)
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
index 6300431ed..a44129938 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
@@ -228,7 +228,7 @@ public:
void callFocusWebViewCallback();
void callSetBackingScaleFactorCallback();
- void overridePreference(JSStringRef preference, bool value);
+ void overridePreference(JSStringRef preference, JSStringRef value);
// Web intents testing.
void sendWebIntentResponse(JSStringRef reply);
diff --git a/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp b/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp
index 0c732100e..fc225e3f4 100644
--- a/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp
+++ b/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp
@@ -45,6 +45,8 @@
namespace WTR {
+static const char* modifierNames[] = { "Shift", "Control", "Alt", "Meta" };
+
enum WTREventType {
WTREventTypeNone = 0,
WTREventTypeMouseDown,
@@ -133,7 +135,6 @@ static unsigned evasMouseButton(unsigned button)
static void setEvasModifiers(Evas* evas, WKEventModifiers wkModifiers)
{
- static const char* modifierNames[] = { "Shift", "Control", "Alt", "Meta" };
for (unsigned modifier = 0; modifier < (sizeof(modifierNames) / sizeof(char*)); ++modifier) {
if (wkModifiers & (1 << modifier))
evas_key_modifier_on(evas, modifierNames[modifier]);
@@ -293,9 +294,19 @@ EventSenderProxy::EventSenderProxy(TestController* testController)
, m_clickTime(0)
, m_clickButton(WTRMouseButtonNone)
, m_mouseButton(WTRMouseButtonNone)
+#if ENABLE(TOUCH_EVENTS)
+ , m_touchPoints(0)
+#endif
{
}
+EventSenderProxy::~EventSenderProxy()
+{
+#if ENABLE(TOUCH_EVENTS)
+ clearTouchPoints();
+#endif
+}
+
void EventSenderProxy::updateClickCountForButton(int button)
{
if (m_time - m_clickTime < 1 && m_position == m_clickPosition && button == m_clickButton) {
@@ -432,54 +443,117 @@ void EventSenderProxy::keyDown(WKStringRef keyRef, WKEventModifiers wkModifiers,
}
#if ENABLE(TOUCH_EVENTS)
+void EventSenderProxy::sendTouchEvent(Ewk_Touch_Event_Type eventType)
+{
+ ASSERT(m_touchPoints);
+
+ Evas_Object* ewkView = m_testController->mainWebView()->platformView();
+ ewk_view_feed_touch_event(ewkView, eventType, m_touchPoints, evas_key_modifier_get(evas_object_evas_get(ewkView)));
+
+ Eina_List* list;
+ Eina_List* listNext;
+ void* data;
+ EINA_LIST_FOREACH_SAFE(m_touchPoints, list, listNext, data) {
+ Ewk_Touch_Point* touchPoint = static_cast<Ewk_Touch_Point*>(data);
+ ASSERT(touchPoint);
+
+ if ((touchPoint->state == EVAS_TOUCH_POINT_UP) || (touchPoint->state == EVAS_TOUCH_POINT_CANCEL)) {
+ delete touchPoint;
+ m_touchPoints = eina_list_remove_list(m_touchPoints, list);
+ } else
+ touchPoint->state = EVAS_TOUCH_POINT_STILL;
+ }
+}
+
void EventSenderProxy::addTouchPoint(int x, int y)
{
- notImplemented();
+ int id = 0;
+ if (m_touchPoints) {
+ Eina_List* last = eina_list_last(m_touchPoints);
+ Ewk_Touch_Point* touchPoint = static_cast<Ewk_Touch_Point*>(eina_list_data_get(last));
+ ASSERT(touchPoint);
+
+ id = touchPoint->id + 1;
+ }
+
+ Ewk_Touch_Point* touchPoint = new Ewk_Touch_Point;
+ touchPoint->id = id;
+ touchPoint->x = x;
+ touchPoint->y = y;
+ touchPoint->state = EVAS_TOUCH_POINT_DOWN;
+
+ m_touchPoints = eina_list_append(m_touchPoints, touchPoint);
}
void EventSenderProxy::updateTouchPoint(int index, int x, int y)
{
- notImplemented();
+ ASSERT(index >= 0 && index < eina_list_count(m_touchPoints));
+
+ Ewk_Touch_Point* touchPoint = static_cast<Ewk_Touch_Point*>(eina_list_nth(m_touchPoints, index));
+ ASSERT(touchPoint);
+
+ touchPoint->x = x;
+ touchPoint->y = y;
+ touchPoint->state = EVAS_TOUCH_POINT_MOVE;
}
void EventSenderProxy::setTouchModifier(WKEventModifiers modifier, bool enable)
{
- notImplemented();
+ for (unsigned index = 0; index < (sizeof(modifierNames) / sizeof(char*)); ++index) {
+ if (modifier & (1 << index)) {
+ if (enable)
+ evas_key_modifier_on(evas_object_evas_get(m_testController->mainWebView()->platformView()), modifierNames[index]);
+ else
+ evas_key_modifier_off(evas_object_evas_get(m_testController->mainWebView()->platformView()), modifierNames[index]);
+ }
+ }
}
void EventSenderProxy::touchStart()
{
- notImplemented();
+ sendTouchEvent(EWK_TOUCH_START);
}
void EventSenderProxy::touchMove()
{
- notImplemented();
+ sendTouchEvent(EWK_TOUCH_MOVE);
}
void EventSenderProxy::touchEnd()
{
- notImplemented();
+ sendTouchEvent(EWK_TOUCH_END);
}
void EventSenderProxy::touchCancel()
{
- notImplemented();
+ sendTouchEvent(EWK_TOUCH_CANCEL);
}
void EventSenderProxy::clearTouchPoints()
{
- notImplemented();
+ void* data = 0;
+ EINA_LIST_FREE(m_touchPoints, data)
+ delete static_cast<Ewk_Touch_Point*>(data);
}
void EventSenderProxy::releaseTouchPoint(int index)
{
- notImplemented();
+ ASSERT(index >= 0 && index < eina_list_count(m_touchPoints));
+
+ Ewk_Touch_Point* touchPoint = static_cast<Ewk_Touch_Point*>(eina_list_nth(m_touchPoints, index));
+ ASSERT(touchPoint);
+
+ touchPoint->state = EVAS_TOUCH_POINT_UP;
}
void EventSenderProxy::cancelTouchPoint(int index)
{
- notImplemented();
+ ASSERT(index >= 0 && index < eina_list_count(m_touchPoints));
+
+ Ewk_Touch_Point* touchPoint = static_cast<Ewk_Touch_Point*>(eina_list_nth(m_touchPoints, index));
+ ASSERT(touchPoint);
+
+ touchPoint->state = EVAS_TOUCH_POINT_CANCEL;
}
void EventSenderProxy::setTouchPointRadius(int radiusX, int radiusY)
diff --git a/Tools/efl/jhbuild.modules b/Tools/efl/jhbuild.modules
index d1f05e309..ecde90d08 100644
--- a/Tools/efl/jhbuild.modules
+++ b/Tools/efl/jhbuild.modules
@@ -41,6 +41,7 @@
<autotools id="cairo" autogen-sh="configure">
<dependencies>
+ <dep package="fontconfig"/>
<dep package="pixman"/>
</dependencies>
<branch module="releases/cairo-1.10.2.tar.gz" version="1.10.2"
diff --git a/Tools/gtk/jhbuild.modules b/Tools/gtk/jhbuild.modules
index f6f13ad4a..723113e8b 100644
--- a/Tools/gtk/jhbuild.modules
+++ b/Tools/gtk/jhbuild.modules
@@ -48,6 +48,7 @@
<autotools id="cairo" autogen-sh="configure">
<dependencies>
+ <dep package="fontconfig"/>
<dep package="pixman"/>
</dependencies>
<branch module="releases/cairo-1.10.2.tar.gz" version="1.10.2"