diff options
Diffstat (limited to 'Tools/WebKitTestRunner')
7 files changed, 41 insertions, 32 deletions
diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp index ded3a329d..cab9a21c5 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp @@ -379,6 +379,8 @@ const gchar* roleToString(AtkObject* object) return "AXInvalid"; case ATK_ROLE_LABEL: return "AXLabel"; + case ATK_ROLE_LEVEL_BAR: + return "AXProgressIndicator"; case ATK_ROLE_LINK: return "AXLink"; case ATK_ROLE_LIST: @@ -1217,15 +1219,15 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const AtkRelationSet* relationSet = atk_object_ref_relation_set(ATK_OBJECT(m_element.get())); if (!relationSet) - return nullptr; + return JSStringCreateWithCharacters(0, 0); AtkRelation* relation = atk_relation_set_get_relation_by_type(relationSet, ATK_RELATION_DESCRIBED_BY); if (!relation) - return nullptr; + return JSStringCreateWithCharacters(0, 0); GPtrArray* targetList = atk_relation_get_target(relation); if (!targetList || !targetList->len) - return nullptr; + return JSStringCreateWithCharacters(0, 0); StringBuilder builder; builder.append("AXHelp: "); @@ -1400,8 +1402,9 @@ double AccessibilityUIElement::maxValue() JSRetainPtr<JSStringRef> AccessibilityUIElement::valueDescription() { - // FIXME: implement - return JSStringCreateWithCharacters(0, 0); + String valueText = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), ObjectAttributeType, "valuetext"); + GUniquePtr<gchar> valueDescription(g_strdup_printf("AXValueDescription: %s", valueText.utf8().data())); + return JSStringCreateWithUTF8CString(valueDescription.get()); } int AccessibilityUIElement::insertionPointLineNumber() diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp index 95ed46d00..7a30b9d6e 100644 --- a/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp +++ b/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp @@ -52,7 +52,7 @@ public: public Q_SLOTS: void timerFired() { - InjectedBundle::shared().testRunner()->waitToDumpWatchdogTimerFired(); + InjectedBundle::singleton().testRunner()->waitToDumpWatchdogTimerFired(); } private: @@ -80,11 +80,8 @@ void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded() if (m_waitToDumpWatchdogTimer.isActive()) return; - if (m_timeout > 0) - timerInterval = m_timeout; - else - timerInterval = waitToDumpWatchdogTimerInterval * 1000; + timerInterval = m_timeout; m_waitToDumpWatchdogTimer.start(timerInterval); } @@ -107,10 +104,9 @@ JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url) return url; } -JSRetainPtr<JSStringRef> TestRunner::platformName() +JSRetainPtr<JSStringRef> TestRunner::inspectorTestStubURL() { - JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("qt")); - return platformName; + return JSStringCreateWithUTF8CString("qrc:/webkit/inspector/UserInterface/TestStub.html"); } } // namespace WTR diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h index 461d87990..56bfbee88 100644 --- a/Tools/WebKitTestRunner/TestController.h +++ b/Tools/WebKitTestRunner/TestController.h @@ -314,8 +314,8 @@ private: std::unique_ptr<EventSenderProxy> m_eventSenderProxy; #if PLATFORM(QT) - class RunLoop; - RunLoop* m_runLoop; + class RunLoopQt; + RunLoopQt* m_runLoop; #endif WorkQueueManager m_workQueueManager; diff --git a/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp b/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp index e16e3efe0..8fdf331db 100644 --- a/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp +++ b/Tools/WebKitTestRunner/qt/EventSenderProxyQt.cpp @@ -28,11 +28,11 @@ #include "PlatformWebView.h" #include "TestController.h" -#include <QGraphicsSceneMouseEvent> +#include <QApplication> #include <QKeyEvent> #include <QtTest/QtTest> -#include <WebKit2/WKPagePrivate.h> -#include <WebKit2/WKStringQt.h> +#include <WebKit/WKPagePrivate.h> +#include <WebKit/WKStringQt.h> #include <qpa/qwindowsysteminterface.h> namespace WTR { diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp index 510b0465e..ea322093c 100644 --- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp +++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp @@ -30,12 +30,12 @@ #include "qquickwebpage_p.h" #include "qquickwebview_p.h" -#include <QCoreApplication> +#include <QApplication> #include <QEventLoop> #include <QQmlProperty> #include <QtQuick/QQuickView> #include <QtQuick/private/qquickwindow_p.h> -#include <WebKit2/WKImageQt.h> +#include <WebKit/WKImageQt.h> #include <qpa/qwindowsysteminterface.h> namespace WTR { @@ -107,6 +107,11 @@ PlatformWebView::~PlatformWebView() m_modalEventLoop->exit(); } +void PlatformWebView::setWindowIsKey(bool isKey) +{ + m_windowIsKey = isKey; +} + void PlatformWebView::resizeTo(unsigned width, unsigned height) { // If we do not have a platform window we will never get the necessary diff --git a/Tools/WebKitTestRunner/qt/TestControllerQt.cpp b/Tools/WebKitTestRunner/qt/TestControllerQt.cpp index 9d3515c82..dd1f3cfbf 100644 --- a/Tools/WebKitTestRunner/qt/TestControllerQt.cpp +++ b/Tools/WebKitTestRunner/qt/TestControllerQt.cpp @@ -28,7 +28,6 @@ #include "TestController.h" #include "PlatformWebView.h" -#include "WKStringQt.h" #include <cstdlib> #include <QCoreApplication> @@ -38,16 +37,17 @@ #include <QObject> #include <QTimer> #include <QtGlobal> +#include <WebKit/WKStringQt.h> #include <qquickwebview_p.h> #include <wtf/Platform.h> #include <wtf/text/WTFString.h> namespace WTR { -class TestController::RunLoop : public QObject { +class TestController::RunLoopQt : public QObject { Q_OBJECT public: - RunLoop(); + RunLoopQt(); void runUntil(double timeout); void notifyDone(); @@ -61,14 +61,14 @@ private: bool m_runUntilLoopClosePending; }; -TestController::RunLoop::RunLoop() +TestController::RunLoopQt::RunLoopQt() : m_runUntilLoopClosePending(false) { m_runUntilLoopTimer.setSingleShot(true); QObject::connect(&m_runUntilLoopTimer, SIGNAL(timeout()), this, SLOT(timerFired())); } -void TestController::RunLoop::runUntil(double timeout) +void TestController::RunLoopQt::runUntil(double timeout) { ASSERT(!m_runUntilLoop.isRunning()); if (timeout) { @@ -78,7 +78,7 @@ void TestController::RunLoop::runUntil(double timeout) m_runUntilLoop.exec(QEventLoop::ExcludeUserInputEvents); } -void TestController::RunLoop::notifyDone() +void TestController::RunLoopQt::notifyDone() { if (m_modalLoop.isRunning()) { // Wait for the modal loop first. We only kill it if we timeout. @@ -90,7 +90,7 @@ void TestController::RunLoop::notifyDone() m_runUntilLoop.exit(); } -void TestController::RunLoop::timerFired() +void TestController::RunLoopQt::timerFired() { if (m_modalLoop.isRunning()) { m_runUntilLoopClosePending = true; @@ -101,7 +101,7 @@ void TestController::RunLoop::timerFired() m_runUntilLoop.exit(); } -void TestController::RunLoop::runModal(PlatformWebView* view) +void TestController::RunLoopQt::runModal(PlatformWebView* view) { ASSERT(!m_modalLoop.isRunning()); view->setModalEventLoop(&m_modalLoop); @@ -118,10 +118,15 @@ void TestController::notifyDone() void TestController::platformInitialize() { - m_runLoop = new RunLoop; + m_runLoop = new RunLoopQt; QQuickWebView::platformInitialize(); } +WKPreferencesRef TestController::platformPreferences() +{ + return WKPageGroupGetPreferences(m_pageGroup.get()); +} + void TestController::platformDestroy() { delete m_runLoop; @@ -130,7 +135,7 @@ void TestController::platformDestroy() void TestController::platformRunUntil(bool& condition, double timeout) { UNUSED_PARAM(condition); - const bool shouldTimeout = !(qgetenv("QT_WEBKIT2_DEBUG") == "1" || timeout == m_noTimeout); + const bool shouldTimeout = !(qgetenv("QT_WEBKIT2_DEBUG") == "1" || timeout <= 0); m_runLoop->runUntil(shouldTimeout ? timeout : 0); } @@ -175,7 +180,7 @@ void TestController::platformInitializeContext() void TestController::runModal(PlatformWebView* view) { - shared().m_runLoop->runModal(view); + singleton().m_runLoop->runModal(view); } const char* TestController::platformLibraryPathForTesting() diff --git a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp index ac6aaf1ec..a1237a05e 100644 --- a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp +++ b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp @@ -32,7 +32,7 @@ #include <QBuffer> #include <QCryptographicHash> #include <QtGui/QPainter> -#include <WebKit2/WKImageQt.h> +#include <WebKit/WKImageQt.h> #include <stdio.h> #include <wtf/Assertions.h> |