summaryrefslogtreecommitdiff
path: root/Tools/WebKitTestRunner
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Tools/WebKitTestRunner
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Tools/WebKitTestRunner')
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp4
-rw-r--r--Tools/WebKitTestRunner/TestController.cpp8
-rw-r--r--Tools/WebKitTestRunner/TestController.h1
-rw-r--r--Tools/WebKitTestRunner/TestInvocation.cpp3
-rw-r--r--Tools/WebKitTestRunner/TestInvocation.h4
-rw-r--r--Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp1
-rw-r--r--Tools/WebKitTestRunner/qt/main.cpp2
7 files changed, 20 insertions, 3 deletions
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 25a6d9233..84f90d804 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -227,7 +227,9 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didReceiveResponseForResource,
didReceiveContentLengthForResource,
didFinishLoadForResource,
- didFailLoadForResource
+ didFailLoadForResource,
+ 0, // shouldCacheResponse
+ 0 // shouldUseCredentialStorage
};
WKBundlePageSetResourceLoadClient(m_page, &resourceLoadClient);
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 0e5db19cf..db6e914f8 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -63,6 +63,7 @@ TestController& TestController::shared()
TestController::TestController(int argc, const char* argv[])
: m_dumpPixels(false)
+ , m_skipPixelTestOption(false)
, m_verbose(false)
, m_printSeparators(false)
, m_usingServerMode(false)
@@ -246,6 +247,12 @@ void TestController::initialize(int argc, const char* argv[])
m_shortTimeout = defaultShortTimeout * m_longTimeout / defaultLongTimeout;
continue;
}
+
+ if (argument == "--skip-pixel-test-if-no-baseline") {
+ m_skipPixelTestOption = true;
+ continue;
+ }
+
if (argument == "--pixel-tests") {
m_dumpPixels = true;
continue;
@@ -489,6 +496,7 @@ bool TestController::runTest(const char* test)
m_state = RunningTest;
m_currentInvocation = adoptPtr(new TestInvocation(pathOrURL));
+ m_currentInvocation->setSkipPixelTestOption(m_skipPixelTestOption);
if (m_dumpPixels)
m_currentInvocation->setIsPixelTest(expectedPixelHash);
diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h
index d0d21514e..32b4ade4b 100644
--- a/Tools/WebKitTestRunner/TestController.h
+++ b/Tools/WebKitTestRunner/TestController.h
@@ -104,6 +104,7 @@ private:
OwnPtr<TestInvocation> m_currentInvocation;
bool m_dumpPixels;
+ bool m_skipPixelTestOption;
bool m_verbose;
bool m_printSeparators;
bool m_usingServerMode;
diff --git a/Tools/WebKitTestRunner/TestInvocation.cpp b/Tools/WebKitTestRunner/TestInvocation.cpp
index 8e3c22957..42a88512c 100644
--- a/Tools/WebKitTestRunner/TestInvocation.cpp
+++ b/Tools/WebKitTestRunner/TestInvocation.cpp
@@ -93,6 +93,7 @@ TestInvocation::TestInvocation(const std::string& pathOrURL)
: m_url(AdoptWK, createWKURL(pathOrURL.c_str()))
, m_pathOrURL(pathOrURL)
, m_dumpPixels(false)
+ , m_skipPixelTestOption(false)
, m_gotInitialResponse(false)
, m_gotFinalMessage(false)
, m_gotRepaint(false)
@@ -106,6 +107,8 @@ TestInvocation::~TestInvocation()
void TestInvocation::setIsPixelTest(const std::string& expectedPixelHash)
{
+ if (m_skipPixelTestOption && !expectedPixelHash.length())
+ return;
m_dumpPixels = true;
m_expectedPixelHash = expectedPixelHash;
}
diff --git a/Tools/WebKitTestRunner/TestInvocation.h b/Tools/WebKitTestRunner/TestInvocation.h
index 5ff7ea0a8..af9f38fc0 100644
--- a/Tools/WebKitTestRunner/TestInvocation.h
+++ b/Tools/WebKitTestRunner/TestInvocation.h
@@ -39,7 +39,8 @@ public:
~TestInvocation();
void setIsPixelTest(const std::string& expectedPixelHash);
-
+ void setSkipPixelTestOption(bool option) { m_skipPixelTestOption = option; }
+
void invoke();
void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
WKRetainPtr<WKTypeRef> didReceiveSynchronousMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
@@ -54,6 +55,7 @@ private:
bool m_dumpPixels;
std::string m_expectedPixelHash;
+ bool m_skipPixelTestOption;
// Invocation state
bool m_gotInitialResponse;
diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
index 425991324..1c3cf697a 100644
--- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
+++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
@@ -75,7 +75,6 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
, m_modalEventLoop(0)
{
QQuickWebViewExperimental experimental(m_view);
- experimental.setUseTraditionalDesktopBehaviour(true);
experimental.setRenderToOffscreenBuffer(true);
}
diff --git a/Tools/WebKitTestRunner/qt/main.cpp b/Tools/WebKitTestRunner/qt/main.cpp
index bdbafd4c9..6c447bda5 100644
--- a/Tools/WebKitTestRunner/qt/main.cpp
+++ b/Tools/WebKitTestRunner/qt/main.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "TestController.h"
+#include "qquickwebview_p.h"
#include <stdio.h>
@@ -91,6 +92,7 @@ int main(int argc, char** argv)
qputenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT", "1");
}
+ QQuickWebViewExperimental::setFlickableViewportEnabled(false);
QApplication app(argc, argv);
Launcher launcher(argc, argv);
QTimer::singleShot(0, &launcher, SLOT(launch()));