Changeset 142972 in webkit


Ignore:
Timestamp:
Feb 15, 2013 1:44:19 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt] Port GCController to JSC C API
https://bugs.webkit.org/show_bug.cgi?id=109690

Patch by Simon Hausmann <simon.hausmann@digia.com> on 2013-02-15
Reviewed by Benjamin Poulain.

Source/WebKit/qt:

Add hooks to retrieve JSContextRef and window object.

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp:

(DumpRenderTreeSupportQt::getJSWindowObject):

  • WebCoreSupport/DumpRenderTreeSupportQt.h:

Tools:

Rename TestRunner to TestRunnerQt to avoid conflict when
including TestRunner.h in the future.

Replaced QObject based GCController implementation with JSC C API
based one.

  • DumpRenderTree/qt/DumpRenderTree.pro:
  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:

(WebCore::DumpRenderTree::DumpRenderTree):
(WebCore::DumpRenderTree::open):
(WebCore::DumpRenderTree::initJSObjects):
(WebCore::methodNameStringForFailedTest):

  • DumpRenderTree/qt/DumpRenderTreeQt.h:

(WebCore::DumpRenderTree::testRunner):
(DumpRenderTree):

  • DumpRenderTree/qt/GCControllerQt.cpp:

(GCController::getJSObjectCount):

  • DumpRenderTree/qt/GCControllerQt.h: Removed.
  • DumpRenderTree/qt/TestRunnerQt.cpp:

(TestRunnerQt::TestRunnerQt):
(TestRunnerQt::reset):
(TestRunnerQt::dumpNotifications):
(TestRunnerQt::processWork):
(TestRunnerQt::maybeDump):
(TestRunnerQt::dumpAsText):
(TestRunnerQt::waitUntilDone):
(TestRunnerQt::setViewModeMediaFeature):
(TestRunnerQt::webHistoryItemCount):
(TestRunnerQt::keepWebHistory):
(TestRunnerQt::notifyDone):
(TestRunnerQt::windowCount):
(TestRunnerQt::grantWebNotificationPermission):
(TestRunnerQt::ignoreLegacyWebNotificationPermissionRequests):
(TestRunnerQt::denyWebNotificationPermission):
(TestRunnerQt::removeAllWebNotificationPermissions):
(TestRunnerQt::simulateWebNotificationClick):
(TestRunnerQt::simulateLegacyWebNotificationClick):
(TestRunnerQt::display):
(TestRunnerQt::displayInvalidatedRegion):
(TestRunnerQt::clearBackForwardList):
(TestRunnerQt::pathToLocalResource):
(TestRunnerQt::dumpEditingCallbacks):
(TestRunnerQt::dumpFrameLoadCallbacks):
(TestRunnerQt::dumpProgressFinishedCallback):
(TestRunnerQt::dumpUserGestureInFrameLoadCallbacks):
(TestRunnerQt::dumpResourceLoadCallbacks):
(TestRunnerQt::dumpResourceResponseMIMETypes):
(TestRunnerQt::dumpWillCacheResponse):
(TestRunnerQt::dumpHistoryCallbacks):
(TestRunnerQt::setWillSendRequestReturnsNullOnRedirect):
(TestRunnerQt::setWillSendRequestReturnsNull):
(TestRunnerQt::setWillSendRequestClearHeader):
(TestRunnerQt::setDeferMainResourceDataLoad):
(TestRunnerQt::queueBackNavigation):
(TestRunnerQt::queueForwardNavigation):
(TestRunnerQt::queueLoad):
(TestRunnerQt::queueLoadHTMLString):
(TestRunnerQt::queueReload):
(TestRunnerQt::queueLoadingScript):
(TestRunnerQt::queueNonLoadingScript):
(TestRunnerQt::provisionalLoad):
(TestRunnerQt::timerEvent):
(TestRunnerQt::encodeHostName):
(TestRunnerQt::decodeHostName):
(TestRunnerQt::closeWebInspector):
(TestRunnerQt::setDeveloperExtrasEnabled):
(TestRunnerQt::setAsynchronousSpellCheckingEnabled):
(TestRunnerQt::showWebInspector):
(TestRunnerQt::evaluateInWebInspector):
(TestRunnerQt::goBack):
(TestRunnerQt::setDefersLoading):
(TestRunnerQt::setAllowUniversalAccessFromFileURLs):
(TestRunnerQt::setAllowFileAccessFromFileURLs):
(TestRunnerQt::setAppCacheMaximumSize):
(TestRunnerQt::setAutofilled):
(TestRunnerQt::setValueForUser):
(TestRunnerQt::setFixedContentsSize):
(TestRunnerQt::setPrivateBrowsingEnabled):
(TestRunnerQt::setSpatialNavigationEnabled):
(TestRunnerQt::setPopupBlockingEnabled):
(TestRunnerQt::setPluginsEnabled):
(TestRunnerQt::setPOSIXLocale):
(TestRunnerQt::setWindowIsKey):
(TestRunnerQt::setMainFrameIsFirstResponder):
(TestRunnerQt::setJavaScriptCanAccessClipboard):
(TestRunnerQt::setXSSAuditorEnabled):
(TestRunnerQt::dispatchPendingLoadRequests):
(TestRunnerQt::clearAllApplicationCaches):
(TestRunnerQt::clearApplicationCacheForOrigin):
(TestRunnerQt::localStorageDiskUsageForOrigin):
(TestRunnerQt::setApplicationCacheOriginQuota):
(TestRunnerQt::applicationCacheDiskUsageForOrigin):
(TestRunnerQt::originsWithApplicationCache):
(TestRunnerQt::setCacheModel):
(TestRunnerQt::setDatabaseQuota):
(TestRunnerQt::clearAllDatabases):
(TestRunnerQt::addOriginAccessWhitelistEntry):
(TestRunnerQt::removeOriginAccessWhitelistEntry):
(TestRunnerQt::setCustomPolicyDelegate):
(TestRunnerQt::waitForPolicyDelegate):
(TestRunnerQt::overridePreference):
(TestRunnerQt::setUserStyleSheetLocation):
(TestRunnerQt::setCaretBrowsingEnabled):
(TestRunnerQt::setAuthorAndUserStylesEnabled):
(TestRunnerQt::setUserStyleSheetEnabled):
(TestRunnerQt::setDomainRelaxationForbiddenForURLScheme):
(TestRunnerQt::callShouldCloseOnWebView):
(TestRunnerQt::setScrollbarPolicy):
(TestRunnerQt::setSmartInsertDeleteEnabled):
(TestRunnerQt::setSelectTrailingWhitespaceEnabled):
(TestRunnerQt::execCommand):
(TestRunnerQt::isCommandEnabled):
(TestRunnerQt::findString):
(TestRunnerQt::markerTextForListItem):
(TestRunnerQt::computedStyleIncludingVisitedInfo):
(TestRunnerQt::elementDoesAutoCompleteForElementWithId):
(TestRunnerQt::authenticateSession):
(TestRunnerQt::setIconDatabaseEnabled):
(TestRunnerQt::setMockDeviceOrientation):
(TestRunnerQt::setGeolocationPermission):
(TestRunnerQt::numberOfPendingGeolocationPermissionRequests):
(TestRunnerQt::setGeolocationPermissionCommon):
(TestRunnerQt::setMockGeolocationPositionUnavailableError):
(TestRunnerQt::setMockGeolocationPosition):
(TestRunnerQt::addMockSpeechInputResult):
(TestRunnerQt::setMockSpeechInputDumpRect):
(TestRunnerQt::startSpeechInput):
(TestRunnerQt::evaluateScriptInIsolatedWorldAndReturnValue):
(TestRunnerQt::evaluateScriptInIsolatedWorld):
(TestRunnerQt::addUserStyleSheet):
(TestRunnerQt::removeAllVisitedLinks):
(TestRunnerQt::addURLToRedirect):
(TestRunnerQt::originsWithLocalStorage):
(TestRunnerQt::deleteAllLocalStorage):
(TestRunnerQt::deleteLocalStorageForOrigin):
(TestRunnerQt::observeStorageTrackerNotifications):
(TestRunnerQt::syncLocalStorage):
(TestRunnerQt::resetPageVisibility):
(TestRunnerQt::setPageVisibility):
(TestRunnerQt::setAutomaticLinkDetectionEnabled):
(TestRunnerQt::setTextDirection):
(TestRunnerQt::setAlwaysAcceptCookies):
(TestRunnerQt::setAlwaysBlockCookies):
(TestRunnerQt::setAudioData):

  • DumpRenderTree/qt/TestRunnerQt.h:

(TestRunnerQt):

Location:
trunk
Files:
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/qt/ChangeLog

    r142755 r142972  
     12013-02-15  Simon Hausmann  <simon.hausmann@digia.com>
     2
     3        [Qt] Port GCController to JSC C API
     4        https://bugs.webkit.org/show_bug.cgi?id=109690
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Add hooks to retrieve JSContextRef and window object.
     9
     10        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     11        (DumpRenderTreeSupportQt::getJSWindowObject):
     12        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     13
    1142013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    215
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r142509 r142972  
    993993#endif
    994994}
     995
     996void DumpRenderTreeSupportQt::getJSWindowObject(QWebFrameAdapter* adapter, JSContextRef* context, JSObjectRef* object)
     997{
     998    JSDOMWindow* window = toJSDOMWindow(adapter->frame, mainThreadNormalWorld());
     999    *object = toRef(window);
     1000    *context = toRef(window->globalExec());
     1001}
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r142509 r142972  
    3030
    3131typedef const struct OpaqueJSContext* JSContextRef;
     32typedef struct OpaqueJSValue* JSObjectRef;
    3233
    3334namespace WebCore {
     
    210211    static QString frameRenderTreeDump(QWebFrameAdapter*);
    211212    static void clearNotificationPermissions();
     213
     214    static void getJSWindowObject(QWebFrameAdapter*, JSContextRef*, JSObjectRef*);
    212215};
    213216
  • trunk/Tools/ChangeLog

    r142950 r142972  
     12013-02-15  Simon Hausmann  <simon.hausmann@digia.com>
     2
     3        [Qt] Port GCController to JSC C API
     4        https://bugs.webkit.org/show_bug.cgi?id=109690
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Rename TestRunner to TestRunnerQt to avoid conflict when
     9        including TestRunner.h in the future.
     10
     11        Replaced QObject based GCController implementation with JSC C API
     12        based one.
     13
     14        * DumpRenderTree/qt/DumpRenderTree.pro:
     15        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     16        (WebCore::DumpRenderTree::DumpRenderTree):
     17        (WebCore::DumpRenderTree::open):
     18        (WebCore::DumpRenderTree::initJSObjects):
     19        (WebCore::methodNameStringForFailedTest):
     20        * DumpRenderTree/qt/DumpRenderTreeQt.h:
     21        (WebCore::DumpRenderTree::testRunner):
     22        (DumpRenderTree):
     23        * DumpRenderTree/qt/GCControllerQt.cpp:
     24        (GCController::getJSObjectCount):
     25        * DumpRenderTree/qt/GCControllerQt.h: Removed.
     26        * DumpRenderTree/qt/TestRunnerQt.cpp:
     27        (TestRunnerQt::TestRunnerQt):
     28        (TestRunnerQt::reset):
     29        (TestRunnerQt::dumpNotifications):
     30        (TestRunnerQt::processWork):
     31        (TestRunnerQt::maybeDump):
     32        (TestRunnerQt::dumpAsText):
     33        (TestRunnerQt::waitUntilDone):
     34        (TestRunnerQt::setViewModeMediaFeature):
     35        (TestRunnerQt::webHistoryItemCount):
     36        (TestRunnerQt::keepWebHistory):
     37        (TestRunnerQt::notifyDone):
     38        (TestRunnerQt::windowCount):
     39        (TestRunnerQt::grantWebNotificationPermission):
     40        (TestRunnerQt::ignoreLegacyWebNotificationPermissionRequests):
     41        (TestRunnerQt::denyWebNotificationPermission):
     42        (TestRunnerQt::removeAllWebNotificationPermissions):
     43        (TestRunnerQt::simulateWebNotificationClick):
     44        (TestRunnerQt::simulateLegacyWebNotificationClick):
     45        (TestRunnerQt::display):
     46        (TestRunnerQt::displayInvalidatedRegion):
     47        (TestRunnerQt::clearBackForwardList):
     48        (TestRunnerQt::pathToLocalResource):
     49        (TestRunnerQt::dumpEditingCallbacks):
     50        (TestRunnerQt::dumpFrameLoadCallbacks):
     51        (TestRunnerQt::dumpProgressFinishedCallback):
     52        (TestRunnerQt::dumpUserGestureInFrameLoadCallbacks):
     53        (TestRunnerQt::dumpResourceLoadCallbacks):
     54        (TestRunnerQt::dumpResourceResponseMIMETypes):
     55        (TestRunnerQt::dumpWillCacheResponse):
     56        (TestRunnerQt::dumpHistoryCallbacks):
     57        (TestRunnerQt::setWillSendRequestReturnsNullOnRedirect):
     58        (TestRunnerQt::setWillSendRequestReturnsNull):
     59        (TestRunnerQt::setWillSendRequestClearHeader):
     60        (TestRunnerQt::setDeferMainResourceDataLoad):
     61        (TestRunnerQt::queueBackNavigation):
     62        (TestRunnerQt::queueForwardNavigation):
     63        (TestRunnerQt::queueLoad):
     64        (TestRunnerQt::queueLoadHTMLString):
     65        (TestRunnerQt::queueReload):
     66        (TestRunnerQt::queueLoadingScript):
     67        (TestRunnerQt::queueNonLoadingScript):
     68        (TestRunnerQt::provisionalLoad):
     69        (TestRunnerQt::timerEvent):
     70        (TestRunnerQt::encodeHostName):
     71        (TestRunnerQt::decodeHostName):
     72        (TestRunnerQt::closeWebInspector):
     73        (TestRunnerQt::setDeveloperExtrasEnabled):
     74        (TestRunnerQt::setAsynchronousSpellCheckingEnabled):
     75        (TestRunnerQt::showWebInspector):
     76        (TestRunnerQt::evaluateInWebInspector):
     77        (TestRunnerQt::goBack):
     78        (TestRunnerQt::setDefersLoading):
     79        (TestRunnerQt::setAllowUniversalAccessFromFileURLs):
     80        (TestRunnerQt::setAllowFileAccessFromFileURLs):
     81        (TestRunnerQt::setAppCacheMaximumSize):
     82        (TestRunnerQt::setAutofilled):
     83        (TestRunnerQt::setValueForUser):
     84        (TestRunnerQt::setFixedContentsSize):
     85        (TestRunnerQt::setPrivateBrowsingEnabled):
     86        (TestRunnerQt::setSpatialNavigationEnabled):
     87        (TestRunnerQt::setPopupBlockingEnabled):
     88        (TestRunnerQt::setPluginsEnabled):
     89        (TestRunnerQt::setPOSIXLocale):
     90        (TestRunnerQt::setWindowIsKey):
     91        (TestRunnerQt::setMainFrameIsFirstResponder):
     92        (TestRunnerQt::setJavaScriptCanAccessClipboard):
     93        (TestRunnerQt::setXSSAuditorEnabled):
     94        (TestRunnerQt::dispatchPendingLoadRequests):
     95        (TestRunnerQt::clearAllApplicationCaches):
     96        (TestRunnerQt::clearApplicationCacheForOrigin):
     97        (TestRunnerQt::localStorageDiskUsageForOrigin):
     98        (TestRunnerQt::setApplicationCacheOriginQuota):
     99        (TestRunnerQt::applicationCacheDiskUsageForOrigin):
     100        (TestRunnerQt::originsWithApplicationCache):
     101        (TestRunnerQt::setCacheModel):
     102        (TestRunnerQt::setDatabaseQuota):
     103        (TestRunnerQt::clearAllDatabases):
     104        (TestRunnerQt::addOriginAccessWhitelistEntry):
     105        (TestRunnerQt::removeOriginAccessWhitelistEntry):
     106        (TestRunnerQt::setCustomPolicyDelegate):
     107        (TestRunnerQt::waitForPolicyDelegate):
     108        (TestRunnerQt::overridePreference):
     109        (TestRunnerQt::setUserStyleSheetLocation):
     110        (TestRunnerQt::setCaretBrowsingEnabled):
     111        (TestRunnerQt::setAuthorAndUserStylesEnabled):
     112        (TestRunnerQt::setUserStyleSheetEnabled):
     113        (TestRunnerQt::setDomainRelaxationForbiddenForURLScheme):
     114        (TestRunnerQt::callShouldCloseOnWebView):
     115        (TestRunnerQt::setScrollbarPolicy):
     116        (TestRunnerQt::setSmartInsertDeleteEnabled):
     117        (TestRunnerQt::setSelectTrailingWhitespaceEnabled):
     118        (TestRunnerQt::execCommand):
     119        (TestRunnerQt::isCommandEnabled):
     120        (TestRunnerQt::findString):
     121        (TestRunnerQt::markerTextForListItem):
     122        (TestRunnerQt::computedStyleIncludingVisitedInfo):
     123        (TestRunnerQt::elementDoesAutoCompleteForElementWithId):
     124        (TestRunnerQt::authenticateSession):
     125        (TestRunnerQt::setIconDatabaseEnabled):
     126        (TestRunnerQt::setMockDeviceOrientation):
     127        (TestRunnerQt::setGeolocationPermission):
     128        (TestRunnerQt::numberOfPendingGeolocationPermissionRequests):
     129        (TestRunnerQt::setGeolocationPermissionCommon):
     130        (TestRunnerQt::setMockGeolocationPositionUnavailableError):
     131        (TestRunnerQt::setMockGeolocationPosition):
     132        (TestRunnerQt::addMockSpeechInputResult):
     133        (TestRunnerQt::setMockSpeechInputDumpRect):
     134        (TestRunnerQt::startSpeechInput):
     135        (TestRunnerQt::evaluateScriptInIsolatedWorldAndReturnValue):
     136        (TestRunnerQt::evaluateScriptInIsolatedWorld):
     137        (TestRunnerQt::addUserStyleSheet):
     138        (TestRunnerQt::removeAllVisitedLinks):
     139        (TestRunnerQt::addURLToRedirect):
     140        (TestRunnerQt::originsWithLocalStorage):
     141        (TestRunnerQt::deleteAllLocalStorage):
     142        (TestRunnerQt::deleteLocalStorageForOrigin):
     143        (TestRunnerQt::observeStorageTrackerNotifications):
     144        (TestRunnerQt::syncLocalStorage):
     145        (TestRunnerQt::resetPageVisibility):
     146        (TestRunnerQt::setPageVisibility):
     147        (TestRunnerQt::setAutomaticLinkDetectionEnabled):
     148        (TestRunnerQt::setTextDirection):
     149        (TestRunnerQt::setAlwaysAcceptCookies):
     150        (TestRunnerQt::setAlwaysBlockCookies):
     151        (TestRunnerQt::setAudioData):
     152        * DumpRenderTree/qt/TestRunnerQt.h:
     153        (TestRunnerQt):
     154
    11552013-02-14  Karen Grunberg  <kareng@chromium.org>
    2156
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro

    r137311 r142972  
    2727    $$PWD/../WorkQueue.h \
    2828    $$PWD/../DumpRenderTree.h \
     29    $$PWD/../GCController.h \
    2930    DumpRenderTreeQt.h \
    3031    EventSenderQt.h \
     
    3233    WorkQueueItemQt.h \
    3334    TestRunnerQt.h \
    34     GCControllerQt.h \
    3535    testplugin.h
    3636
     
    3838    $$PWD/../WorkQueue.cpp \
    3939    $$PWD/../DumpRenderTreeCommon.cpp \
     40    $$PWD/../GCController.cpp \
    4041    DumpRenderTreeQt.cpp \
    4142    EventSenderQt.cpp \
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r142509 r142972  
    3636#include "DumpRenderTreeSupportQt.h"
    3737#include "EventSenderQt.h"
    38 #include "GCControllerQt.h"
     38#include "GCController.h"
    3939#include "InitWebCoreQt.h"
    4040#include "InitWebKitQt.h"
     
    423423
    424424    m_mainView->setContextMenuPolicy(Qt::NoContextMenu);
    425     m_mainView->resize(QSize(TestRunner::maxViewWidth, TestRunner::maxViewHeight));
     425    m_mainView->resize(QSize(TestRunnerQt::maxViewWidth, TestRunnerQt::maxViewHeight));
    426426
    427427    // clean up cache by resetting quota.
     
    431431    // create our controllers. This has to be done before connectFrame,
    432432    // as it exports there to the JavaScript DOM window.
    433     m_controller = new TestRunner(this);
     433    m_controller = new TestRunnerQt(this);
    434434    connect(m_controller, SIGNAL(showPage()), this, SLOT(showPage()));
    435435    connect(m_controller, SIGNAL(hidePage()), this, SLOT(hidePage()));
     
    441441    m_eventSender = new EventSender(m_page);
    442442    m_textInputController = new TextInputController(m_page);
    443     m_gcController = new GCController(m_page);
     443    m_gcController.reset(new GCController());
    444444
    445445    // now connect our different signals
     
    613613    // W3C SVG tests expect to be 480x360
    614614    bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1");
    615     int width = isW3CTest ? 480 : TestRunner::maxViewWidth;
    616     int height = isW3CTest ? 360 : TestRunner::maxViewHeight;
     615    int width = isW3CTest ? 480 : TestRunnerQt::maxViewWidth;
     616    int height = isW3CTest ? 360 : TestRunnerQt::maxViewHeight;
    617617    m_mainView->resize(QSize(width, height));
    618618    m_page->setPreferredContentsSize(QSize());
     
    736736    QWebFrame *frame = qobject_cast<QWebFrame*>(sender());
    737737    Q_ASSERT(frame);
     738
     739    JSContextRef context = 0;
     740    JSObjectRef window = 0;
     741
     742    DumpRenderTreeSupportQt::getJSWindowObject(frame->handle(), &context, &window);
     743
    738744    frame->addToJavaScriptWindowObject(QLatin1String("testRunner"), m_controller);
    739745    frame->addToJavaScriptWindowObject(QLatin1String("eventSender"), m_eventSender);
    740746    frame->addToJavaScriptWindowObject(QLatin1String("textInputController"), m_textInputController);
    741     frame->addToJavaScriptWindowObject(QLatin1String("GCController"), m_gcController);
     747    m_gcController->makeWindowObject(context, window, 0);
     748
    742749    DumpRenderTreeSupportQt::injectInternalsObject(frame->handle());
    743750}
     
    879886}
    880887
    881 static const char *methodNameStringForFailedTest(TestRunner *controller)
     888static const char *methodNameStringForFailedTest(TestRunnerQt *controller)
    882889{
    883890    const char *errorMessage;
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h

    r135582 r142972  
    5757class QWebPageAdapter;
    5858
    59 class TestRunner;
     59class TestRunnerQt;
    6060class DumpRenderTreeSupportQt;
    6161class EventSender;
     
    8787    void resetToConsistentStateBeforeTesting(const QUrl&);
    8888
    89     TestRunner *testRunner() const { return m_controller; }
     89    TestRunnerQt *testRunner() const { return m_controller; }
    9090    EventSender *eventSender() const { return m_eventSender; }
    9191    TextInputController *textInputController() const { return m_textInputController; }
     
    144144    QString dumpBackForwardList(QWebPage* page);
    145145    QString dumpFrameScrollPosition(QWebFrame* frame);
    146     TestRunner *m_controller;
     146    TestRunnerQt *m_controller;
    147147
    148148    bool m_dumpPixelsForCurrentTest;
     
    156156    EventSender *m_eventSender;
    157157    TextInputController *m_textInputController;
    158     GCController* m_gcController;
     158    QScopedPointer<GCController> m_gcController;
    159159    NetworkAccessManager* m_networkAccessManager;
    160160
  • trunk/Tools/DumpRenderTree/qt/GCControllerQt.cpp

    r82489 r142972  
    2929
    3030#include "config.h"
    31 #include "GCControllerQt.h"
     31#include "GCController.h"
     32
    3233#include "DumpRenderTreeSupportQt.h"
    33 
    34 #include <qwebpage.h>
    35 
    36 GCController::GCController(QWebPage* parent)
    37     : QObject(parent)
    38 {
    39 }
    4034
    4135void GCController::collect() const
     
    4943}
    5044
    51 unsigned int GCController::getJSObjectCount() const
     45size_t GCController::getJSObjectCount() const
    5246{
    5347    return DumpRenderTreeSupportQt::javaScriptObjectsCount();
  • trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp

    r142509 r142972  
    4040#include <qwebsettings.h>
    4141
    42 TestRunner::TestRunner(WebCore::DumpRenderTree* drt)
     42TestRunnerQt::TestRunnerQt(WebCore::DumpRenderTree* drt)
    4343    : QObject()
    4444    , m_drt(drt)
     
    4949}
    5050
    51 void TestRunner::reset()
     51void TestRunnerQt::reset()
    5252{
    5353    m_hasDumped = false;
     
    104104}
    105105
    106 void TestRunner::dumpNotifications()
     106void TestRunnerQt::dumpNotifications()
    107107{
    108108    DumpRenderTreeSupportQt::dumpNotification(true);
    109109}
    110110
    111 void TestRunner::processWork()
     111void TestRunnerQt::processWork()
    112112{
    113113    // qDebug() << ">>>processWork";
     
    121121
    122122// Called on loadFinished on WebPage
    123 void TestRunner::maybeDump(bool /*success*/)
     123void TestRunnerQt::maybeDump(bool /*success*/)
    124124{
    125125
     
    152152}
    153153
    154 void TestRunner::dumpAsText(bool shouldDumpPixels)
     154void TestRunnerQt::dumpAsText(bool shouldDumpPixels)
    155155{
    156156    m_textDump = true;
     
    158158}
    159159
    160 void TestRunner::waitUntilDone()
     160void TestRunnerQt::waitUntilDone()
    161161{
    162162    //qDebug() << ">>>>waitForDone";
     
    169169}
    170170
    171 void TestRunner::setViewModeMediaFeature(const QString& mode)
     171void TestRunnerQt::setViewModeMediaFeature(const QString& mode)
    172172{
    173173    m_drt->webPage()->setProperty("_q_viewMode", mode);
    174174}
    175175
    176 int TestRunner::webHistoryItemCount()
     176int TestRunnerQt::webHistoryItemCount()
    177177{
    178178    if (!m_webHistory)
     
    184184}
    185185
    186 void TestRunner::keepWebHistory()
     186void TestRunnerQt::keepWebHistory()
    187187{
    188188    m_webHistory = m_drt->webPage()->history();
    189189}
    190190
    191 void TestRunner::notifyDone()
     191void TestRunnerQt::notifyDone()
    192192{
    193193    qDebug() << ">>>>notifyDone";
     
    213213}
    214214
    215 int TestRunner::windowCount()
     215int TestRunnerQt::windowCount()
    216216{
    217217    return m_drt->windowCount();
    218218}
    219219
    220 void TestRunner::grantWebNotificationPermission(const QString& origin)
     220void TestRunnerQt::grantWebNotificationPermission(const QString& origin)
    221221{
    222222    QWebFrame* frame = m_drt->webPage()->mainFrame();
     
    224224}
    225225
    226 void TestRunner::ignoreLegacyWebNotificationPermissionRequests()
     226void TestRunnerQt::ignoreLegacyWebNotificationPermissionRequests()
    227227{
    228228    m_ignoreDesktopNotification = true;
    229229}
    230230
    231 void TestRunner::denyWebNotificationPermission(const QString& origin)
     231void TestRunnerQt::denyWebNotificationPermission(const QString& origin)
    232232{
    233233    QWebFrame* frame = m_drt->webPage()->mainFrame();
     
    235235}
    236236
    237 void TestRunner::removeAllWebNotificationPermissions()
     237void TestRunnerQt::removeAllWebNotificationPermissions()
    238238{
    239239    DumpRenderTreeSupportQt::clearNotificationPermissions();
    240240}
    241241
    242 void TestRunner::simulateWebNotificationClick(const QWebElement& notification)
     242void TestRunnerQt::simulateWebNotificationClick(const QWebElement& notification)
    243243{
    244244    // FIXME: implement.
    245245}
    246246
    247 void TestRunner::simulateLegacyWebNotificationClick(const QString& title)
     247void TestRunnerQt::simulateLegacyWebNotificationClick(const QString& title)
    248248{
    249249    DumpRenderTreeSupportQt::simulateDesktopNotificationClick(title);
    250250}
    251251
    252 void TestRunner::display()
     252void TestRunnerQt::display()
    253253{
    254254    DumpRenderTreeSupportQt::setTrackRepaintRects(m_topLoadingFrame->handle(), true);
     
    256256}
    257257
    258 void TestRunner::displayInvalidatedRegion()
     258void TestRunnerQt::displayInvalidatedRegion()
    259259{
    260260    display();
    261261}
    262262
    263 void TestRunner::clearBackForwardList()
     263void TestRunnerQt::clearBackForwardList()
    264264{
    265265    m_drt->webPage()->history()->clear();
    266266}
    267267
    268 QString TestRunner::pathToLocalResource(const QString& url)
     268QString TestRunnerQt::pathToLocalResource(const QString& url)
    269269{
    270270    QString localTmpUrl(QLatin1String("file:///tmp/LayoutTests"));
     
    283283}
    284284
    285 void TestRunner::dumpEditingCallbacks()
     285void TestRunnerQt::dumpEditingCallbacks()
    286286{
    287287    qDebug() << ">>>dumpEditingCallbacks";
     
    289289}
    290290
    291 void TestRunner::dumpFrameLoadCallbacks()
     291void TestRunnerQt::dumpFrameLoadCallbacks()
    292292{
    293293    DumpRenderTreeSupportQt::dumpFrameLoader(true);
    294294}
    295295
    296 void TestRunner::dumpProgressFinishedCallback()
     296void TestRunnerQt::dumpProgressFinishedCallback()
    297297{
    298298    DumpRenderTreeSupportQt::dumpProgressFinishedCallback(true);
    299299}
    300300
    301 void TestRunner::dumpUserGestureInFrameLoadCallbacks()
     301void TestRunnerQt::dumpUserGestureInFrameLoadCallbacks()
    302302{
    303303    DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(true);
    304304}
    305305
    306 void TestRunner::dumpResourceLoadCallbacks()
     306void TestRunnerQt::dumpResourceLoadCallbacks()
    307307{
    308308    DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(true);
    309309}
    310310
    311 void TestRunner::dumpResourceResponseMIMETypes()
     311void TestRunnerQt::dumpResourceResponseMIMETypes()
    312312{
    313313    DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(true);
    314314}
    315315
    316 void TestRunner::dumpWillCacheResponse()
     316void TestRunnerQt::dumpWillCacheResponse()
    317317{
    318318    DumpRenderTreeSupportQt::dumpWillCacheResponseCallbacks(true);
    319319}
    320320
    321 void TestRunner::dumpHistoryCallbacks()
     321void TestRunnerQt::dumpHistoryCallbacks()
    322322{
    323323    DumpRenderTreeSupportQt::dumpHistoryCallbacks(true);
    324324}
    325325
    326 void TestRunner::setWillSendRequestReturnsNullOnRedirect(bool enabled)
     326void TestRunnerQt::setWillSendRequestReturnsNullOnRedirect(bool enabled)
    327327{
    328328    DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(enabled);
    329329}
    330330
    331 void TestRunner::setWillSendRequestReturnsNull(bool enabled)
     331void TestRunnerQt::setWillSendRequestReturnsNull(bool enabled)
    332332{
    333333    DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(enabled);
    334334}
    335335
    336 void TestRunner::setWillSendRequestClearHeader(const QStringList& headers)
     336void TestRunnerQt::setWillSendRequestClearHeader(const QStringList& headers)
    337337{
    338338    DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(headers);
    339339}
    340340
    341 void TestRunner::setDeferMainResourceDataLoad(bool defer)
     341void TestRunnerQt::setDeferMainResourceDataLoad(bool defer)
    342342{
    343343    DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(defer);
    344344}
    345345
    346 void TestRunner::queueBackNavigation(int howFarBackward)
     346void TestRunnerQt::queueBackNavigation(int howFarBackward)
    347347{
    348348    //qDebug() << ">>>queueBackNavigation" << howFarBackward;
     
    351351}
    352352
    353 void TestRunner::queueForwardNavigation(int howFarForward)
     353void TestRunnerQt::queueForwardNavigation(int howFarForward)
    354354{
    355355    //qDebug() << ">>>queueForwardNavigation" << howFarForward;
     
    358358}
    359359
    360 void TestRunner::queueLoad(const QString& url, const QString& target)
     360void TestRunnerQt::queueLoad(const QString& url, const QString& target)
    361361{
    362362    //qDebug() << ">>>queueLoad" << url << target;
     
    366366}
    367367
    368 void TestRunner::queueLoadHTMLString(const QString& content, const QString& baseURL, const QString& failingURL)
     368void TestRunnerQt::queueLoadHTMLString(const QString& content, const QString& baseURL, const QString& failingURL)
    369369{
    370370    if (failingURL.isEmpty())
     
    374374}
    375375
    376 void TestRunner::queueReload()
     376void TestRunnerQt::queueReload()
    377377{
    378378    //qDebug() << ">>>queueReload";
     
    380380}
    381381
    382 void TestRunner::queueLoadingScript(const QString& script)
     382void TestRunnerQt::queueLoadingScript(const QString& script)
    383383{
    384384    //qDebug() << ">>>queueLoadingScript" << script;
     
    386386}
    387387
    388 void TestRunner::queueNonLoadingScript(const QString& script)
     388void TestRunnerQt::queueNonLoadingScript(const QString& script)
    389389{
    390390    //qDebug() << ">>>queueNonLoadingScript" << script;
     
    392392}
    393393
    394 void TestRunner::provisionalLoad()
     394void TestRunnerQt::provisionalLoad()
    395395{
    396396    QWebFrame* frame = qobject_cast<QWebFrame*>(sender());
     
    399399}
    400400
    401 void TestRunner::timerEvent(QTimerEvent *ev)
     401void TestRunnerQt::timerEvent(QTimerEvent *ev)
    402402{
    403403    if (ev->timerId() == m_timeoutTimer.timerId()) {
     
    410410}
    411411
    412 QString TestRunner::encodeHostName(const QString& host)
     412QString TestRunnerQt::encodeHostName(const QString& host)
    413413{
    414414    QString encoded = QString::fromLatin1(QUrl::toAce(host + QLatin1String(".no")));
     
    417417}
    418418
    419 QString TestRunner::decodeHostName(const QString& host)
     419QString TestRunnerQt::decodeHostName(const QString& host)
    420420{
    421421    QString decoded = QUrl::fromAce(host.toLatin1() + QByteArray(".no"));
     
    424424}
    425425
    426 void TestRunner::closeWebInspector()
     426void TestRunnerQt::closeWebInspector()
    427427{
    428428    DumpRenderTreeSupportQt::webInspectorClose(m_drt->pageAdapter());
     
    430430}
    431431
    432 void TestRunner::setDeveloperExtrasEnabled(bool enabled)
     432void TestRunnerQt::setDeveloperExtrasEnabled(bool enabled)
    433433{
    434434    m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enabled);
    435435}
    436436
    437 void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
     437void TestRunnerQt::setAsynchronousSpellCheckingEnabled(bool)
    438438{
    439439    // FIXME: Implement this.
    440440}
    441441
    442 void TestRunner::showWebInspector()
     442void TestRunnerQt::showWebInspector()
    443443{
    444444    m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
     
    446446}
    447447
    448 void TestRunner::evaluateInWebInspector(long callId, const QString& script)
     448void TestRunnerQt::evaluateInWebInspector(long callId, const QString& script)
    449449{
    450450    DumpRenderTreeSupportQt::webInspectorExecuteScript(m_drt->pageAdapter(), callId, script);
    451451}
    452452
    453 void TestRunner::goBack()
     453void TestRunnerQt::goBack()
    454454{
    455455    DumpRenderTreeSupportQt::goBack(m_drt->pageAdapter());
    456456}
    457457
    458 void TestRunner::setDefersLoading(bool flag)
     458void TestRunnerQt::setDefersLoading(bool flag)
    459459{
    460460    DumpRenderTreeSupportQt::setDefersLoading(m_drt->pageAdapter(), flag);
    461461}
    462462
    463 void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
     463void TestRunnerQt::setAllowUniversalAccessFromFileURLs(bool enabled)
    464464{
    465465    m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, enabled);
    466466}
    467467
    468 void TestRunner::setAllowFileAccessFromFileURLs(bool enabled)
     468void TestRunnerQt::setAllowFileAccessFromFileURLs(bool enabled)
    469469{
    470470    m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessFileUrls, enabled);
    471471}
    472472
    473 void TestRunner::setAppCacheMaximumSize(unsigned long long quota)
     473void TestRunnerQt::setAppCacheMaximumSize(unsigned long long quota)
    474474{
    475475    m_drt->webPage()->settings()->setOfflineWebApplicationCacheQuota(quota);
    476476}
    477477
    478 void TestRunner::setAutofilled(const QWebElement& element, bool isAutofilled)
     478void TestRunnerQt::setAutofilled(const QWebElement& element, bool isAutofilled)
    479479{
    480480    return DumpRenderTreeSupportQt::setAutofilled(element, isAutofilled);
    481481}
    482482
    483 void TestRunner::setValueForUser(const QWebElement& element, const QString& value)
     483void TestRunnerQt::setValueForUser(const QWebElement& element, const QString& value)
    484484{
    485485    DumpRenderTreeSupportQt::setValueForUser(element, value);
    486486}
    487487
    488 void TestRunner::setFixedContentsSize(int width, int height)
     488void TestRunnerQt::setFixedContentsSize(int width, int height)
    489489{
    490490    m_topLoadingFrame->page()->setPreferredContentsSize(QSize(width, height));
    491491}
    492492
    493 void TestRunner::setPrivateBrowsingEnabled(bool enable)
     493void TestRunnerQt::setPrivateBrowsingEnabled(bool enable)
    494494{
    495495    m_drt->webPage()->settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, enable);
    496496}
    497497
    498 void TestRunner::setSpatialNavigationEnabled(bool enable)
     498void TestRunnerQt::setSpatialNavigationEnabled(bool enable)
    499499{
    500500    m_drt->webPage()->settings()->setAttribute(QWebSettings::SpatialNavigationEnabled, enable);
    501501}
    502502
    503 void TestRunner::setPopupBlockingEnabled(bool enable)
     503void TestRunnerQt::setPopupBlockingEnabled(bool enable)
    504504{
    505505    m_drt->webPage()->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, !enable);
    506506}
    507507
    508 void TestRunner::setPluginsEnabled(bool flag)
     508void TestRunnerQt::setPluginsEnabled(bool flag)
    509509{
    510510    // FIXME: Implement
    511511}
    512512
    513 void TestRunner::setPOSIXLocale(const QString& locale)
     513void TestRunnerQt::setPOSIXLocale(const QString& locale)
    514514{
    515515    QLocale qlocale(locale);
     
    517517}
    518518
    519 void TestRunner::setWindowIsKey(bool isKey)
     519void TestRunnerQt::setWindowIsKey(bool isKey)
    520520{
    521521    m_drt->switchFocus(isKey);
    522522}
    523523
    524 void TestRunner::setMainFrameIsFirstResponder(bool isFirst)
     524void TestRunnerQt::setMainFrameIsFirstResponder(bool isFirst)
    525525{
    526526    //FIXME: only need this for the moment: https://bugs.webkit.org/show_bug.cgi?id=32990
    527527}
    528528
    529 void TestRunner::setJavaScriptCanAccessClipboard(bool enable)
     529void TestRunnerQt::setJavaScriptCanAccessClipboard(bool enable)
    530530{
    531531    m_drt->webPage()->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, enable);
    532532}
    533533
    534 void TestRunner::setXSSAuditorEnabled(bool enable)
     534void TestRunnerQt::setXSSAuditorEnabled(bool enable)
    535535{
    536536    // Set XSSAuditingEnabled globally so that windows created by the test inherit it too.
     
    542542}
    543543
    544 void TestRunner::dispatchPendingLoadRequests()
     544void TestRunnerQt::dispatchPendingLoadRequests()
    545545{
    546546    // FIXME: Implement for testing fix for 6727495
    547547}
    548548
    549 void TestRunner::clearAllApplicationCaches()
     549void TestRunnerQt::clearAllApplicationCaches()
    550550{
    551551    DumpRenderTreeSupportQt::clearAllApplicationCaches();
    552552}
    553553
    554 void TestRunner::clearApplicationCacheForOrigin(const QString& url)
     554void TestRunnerQt::clearApplicationCacheForOrigin(const QString& url)
    555555{
    556556    // FIXME: Implement to support deleting all application caches for an origin.
    557557}
    558558
    559 long long TestRunner::localStorageDiskUsageForOrigin(const QString& originIdentifier)
     559long long TestRunnerQt::localStorageDiskUsageForOrigin(const QString& originIdentifier)
    560560{
    561561    // FIXME: Implement to support getting disk usage in bytes for an origin.
     
    563563}
    564564
    565 void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
     565void TestRunnerQt::setApplicationCacheOriginQuota(unsigned long long quota)
    566566{
    567567    if (!m_topLoadingFrame)
     
    570570}
    571571
    572 long long TestRunner::applicationCacheDiskUsageForOrigin(const QString& origin)
     572long long TestRunnerQt::applicationCacheDiskUsageForOrigin(const QString& origin)
    573573{
    574574    // FIXME: Implement to support getting disk usage by all application caches for an origin.
     
    576576}
    577577
    578 QStringList TestRunner::originsWithApplicationCache()
     578QStringList TestRunnerQt::originsWithApplicationCache()
    579579{
    580580    // FIXME: Implement to get origins that have application caches.
     
    582582}
    583583
    584 void TestRunner::setCacheModel(int model)
     584void TestRunnerQt::setCacheModel(int model)
    585585{
    586586    // qwebsetting doesn't have matched setting yet :
     
    592592}
    593593
    594 void TestRunner::setDatabaseQuota(int size)
     594void TestRunnerQt::setDatabaseQuota(int size)
    595595{
    596596    if (!m_topLoadingFrame)
     
    599599}
    600600
    601 void TestRunner::clearAllDatabases()
     601void TestRunnerQt::clearAllDatabases()
    602602{
    603603    QWebDatabase::removeAllDatabases();
    604604}
    605605
    606 void TestRunner::addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
     606void TestRunnerQt::addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
    607607{
    608608    DumpRenderTreeSupportQt::whiteListAccessFromOrigin(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains);
    609609}
    610610
    611 void TestRunner::removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
     611void TestRunnerQt::removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
    612612{
    613613    DumpRenderTreeSupportQt::removeWhiteListAccessFromOrigin(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains);
    614614}
    615615
    616 void TestRunner::setCustomPolicyDelegate(bool enabled, bool permissive)
     616void TestRunnerQt::setCustomPolicyDelegate(bool enabled, bool permissive)
    617617{
    618618    DumpRenderTreeSupportQt::setCustomPolicyDelegate(enabled, permissive);
    619619}
    620620
    621 void TestRunner::waitForPolicyDelegate()
     621void TestRunnerQt::waitForPolicyDelegate()
    622622{
    623623    setCustomPolicyDelegate(true);
     
    626626}
    627627
    628 void TestRunner::overridePreference(const QString& name, const QVariant& value)
     628void TestRunnerQt::overridePreference(const QString& name, const QVariant& value)
    629629{
    630630    QWebSettings* settings = m_topLoadingFrame->page()->settings();
     
    663663}
    664664
    665 void TestRunner::setUserStyleSheetLocation(const QString& url)
     665void TestRunnerQt::setUserStyleSheetLocation(const QString& url)
    666666{
    667667    QByteArray urlData = pathToLocalResource(url).toLatin1();
     
    672672}
    673673
    674 void TestRunner::setCaretBrowsingEnabled(bool value)
     674void TestRunnerQt::setCaretBrowsingEnabled(bool value)
    675675{
    676676    DumpRenderTreeSupportQt::setCaretBrowsingEnabled(m_drt->pageAdapter(), value);
    677677}
    678678
    679 void TestRunner::setAuthorAndUserStylesEnabled(bool value)
     679void TestRunnerQt::setAuthorAndUserStylesEnabled(bool value)
    680680{
    681681    DumpRenderTreeSupportQt::setAuthorAndUserStylesEnabled(m_drt->pageAdapter(), value);
    682682}
    683683
    684 void TestRunner::setUserStyleSheetEnabled(bool enabled)
     684void TestRunnerQt::setUserStyleSheetEnabled(bool enabled)
    685685{
    686686    m_userStyleSheetEnabled = enabled;
     
    692692}
    693693
    694 void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
     694void TestRunnerQt::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
    695695{
    696696    DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
    697697}
    698698
    699 bool TestRunner::callShouldCloseOnWebView()
     699bool TestRunnerQt::callShouldCloseOnWebView()
    700700{
    701701    return DumpRenderTreeSupportQt::shouldClose(m_drt->mainFrameAdapter());
    702702}
    703703
    704 void TestRunner::setScrollbarPolicy(const QString& orientation, const QString& policy)
     704void TestRunnerQt::setScrollbarPolicy(const QString& orientation, const QString& policy)
    705705{
    706706    Qt::Orientation o;
     
    726726}
    727727
    728 void TestRunner::setSmartInsertDeleteEnabled(bool enable)
     728void TestRunnerQt::setSmartInsertDeleteEnabled(bool enable)
    729729{
    730730    DumpRenderTreeSupportQt::setSmartInsertDeleteEnabled(m_drt->pageAdapter(), enable);
    731731}
    732732
    733 void TestRunner::setSelectTrailingWhitespaceEnabled(bool enable)
     733void TestRunnerQt::setSelectTrailingWhitespaceEnabled(bool enable)
    734734{
    735735    DumpRenderTreeSupportQt::setSelectTrailingWhitespaceEnabled(m_drt->pageAdapter(), enable);
    736736}
    737737
    738 void TestRunner::execCommand(const QString& name, const QString& value)
     738void TestRunnerQt::execCommand(const QString& name, const QString& value)
    739739{
    740740    DumpRenderTreeSupportQt::executeCoreCommandByName(m_drt->pageAdapter(), name, value);
    741741}
    742742
    743 bool TestRunner::isCommandEnabled(const QString& name) const
     743bool TestRunnerQt::isCommandEnabled(const QString& name) const
    744744{
    745745    return DumpRenderTreeSupportQt::isCommandEnabled(m_drt->pageAdapter(), name);
    746746}
    747747
    748 bool TestRunner::findString(const QString& string, const QStringList& optionArray)
     748bool TestRunnerQt::findString(const QString& string, const QStringList& optionArray)
    749749{
    750750    return DumpRenderTreeSupportQt::findString(m_drt->pageAdapter(), string, optionArray);
    751751}
    752752
    753 QString TestRunner::markerTextForListItem(const QWebElement& listItem)
     753QString TestRunnerQt::markerTextForListItem(const QWebElement& listItem)
    754754{
    755755    return DumpRenderTreeSupportQt::markerTextForListItem(listItem);
    756756}
    757757
    758 QVariantMap TestRunner::computedStyleIncludingVisitedInfo(const QWebElement& element) const
     758QVariantMap TestRunnerQt::computedStyleIncludingVisitedInfo(const QWebElement& element) const
    759759{
    760760    return DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(element);
    761761}
    762762
    763 bool TestRunner::elementDoesAutoCompleteForElementWithId(const QString& elementId)
     763bool TestRunnerQt::elementDoesAutoCompleteForElementWithId(const QString& elementId)
    764764{
    765765    return DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId(m_drt->mainFrameAdapter(), elementId);
    766766}
    767767
    768 void TestRunner::authenticateSession(const QString&, const QString&, const QString&)
     768void TestRunnerQt::authenticateSession(const QString&, const QString&, const QString&)
    769769{
    770770    // FIXME: If there is a concept per-session (per-process) credential storage, the credentials should be added to it for later use.
    771771}
    772772
    773 void TestRunner::setIconDatabaseEnabled(bool enable)
     773void TestRunnerQt::setIconDatabaseEnabled(bool enable)
    774774{
    775775    if (enable && !m_drt->persistentStoragePath().isEmpty())
     
    779779}
    780780
    781 void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
     781void TestRunnerQt::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
    782782{
    783783    QList<WebCore::WebPage*> pages = m_drt->getAllPages();
     
    786786}
    787787
    788 void TestRunner::setGeolocationPermission(bool allow)
     788void TestRunnerQt::setGeolocationPermission(bool allow)
    789789{
    790790    setGeolocationPermissionCommon(allow);
     
    794794}
    795795
    796 int TestRunner::numberOfPendingGeolocationPermissionRequests()
     796int TestRunnerQt::numberOfPendingGeolocationPermissionRequests()
    797797{
    798798    int pendingPermissionCount = 0;
     
    804804}
    805805
    806 void TestRunner::setGeolocationPermissionCommon(bool allow)
     806void TestRunnerQt::setGeolocationPermissionCommon(bool allow)
    807807{
    808808     m_isGeolocationPermissionSet = true;
     
    810810}
    811811
    812 void TestRunner::setMockGeolocationPositionUnavailableError(const QString& message)
     812void TestRunnerQt::setMockGeolocationPositionUnavailableError(const QString& message)
    813813{
    814814    QList<WebCore::WebPage*> pages = m_drt->getAllPages();
     
    817817}
    818818
    819 void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
     819void TestRunnerQt::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
    820820{
    821821    QList<WebCore::WebPage*> pages = m_drt->getAllPages();
     
    824824}
    825825
    826 void TestRunner::addMockSpeechInputResult(const QString& result, double confidence, const QString& language)
     826void TestRunnerQt::addMockSpeechInputResult(const QString& result, double confidence, const QString& language)
    827827{
    828828    // FIXME: Implement for speech input layout tests.
     
    830830}
    831831
    832 void TestRunner::setMockSpeechInputDumpRect(bool flag)
     832void TestRunnerQt::setMockSpeechInputDumpRect(bool flag)
    833833{
    834834    // FIXME: Implement for speech input layout tests.
     
    836836}
    837837
    838 void TestRunner::startSpeechInput(const QString& inputElement)
     838void TestRunnerQt::startSpeechInput(const QString& inputElement)
    839839{
    840840    // FIXME: Implement for speech input layout tests.
     
    842842}
    843843
    844 void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(int worldID, const QString& script)
     844void TestRunnerQt::evaluateScriptInIsolatedWorldAndReturnValue(int worldID, const QString& script)
    845845{
    846846    // FIXME: Implement.
    847847}
    848848
    849 void TestRunner::evaluateScriptInIsolatedWorld(int worldID, const QString& script)
     849void TestRunnerQt::evaluateScriptInIsolatedWorld(int worldID, const QString& script)
    850850{
    851851    DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(m_drt->mainFrameAdapter(), worldID, script);
    852852}
    853853
    854 void TestRunner::addUserStyleSheet(const QString& sourceCode)
     854void TestRunnerQt::addUserStyleSheet(const QString& sourceCode)
    855855{
    856856    DumpRenderTreeSupportQt::addUserStyleSheet(m_drt->pageAdapter(), sourceCode);
    857857}
    858858
    859 void TestRunner::removeAllVisitedLinks()
     859void TestRunnerQt::removeAllVisitedLinks()
    860860{
    861861    QWebHistory* history = m_drt->webPage()->history();
     
    864864}
    865865
    866 void TestRunner::addURLToRedirect(const QString& origin, const QString& destination)
     866void TestRunnerQt::addURLToRedirect(const QString& origin, const QString& destination)
    867867{
    868868    DumpRenderTreeSupportQt::addURLToRedirect(origin, destination);
    869869}
    870870
    871 void TestRunner::originsWithLocalStorage()
     871void TestRunnerQt::originsWithLocalStorage()
    872872{
    873873    // FIXME: Implement.
    874874}
    875875
    876 void TestRunner::deleteAllLocalStorage()
     876void TestRunnerQt::deleteAllLocalStorage()
    877877{
    878878    // FIXME: Implement.
    879879}
    880880
    881 void TestRunner::deleteLocalStorageForOrigin(const QString& originIdentifier)
     881void TestRunnerQt::deleteLocalStorageForOrigin(const QString& originIdentifier)
    882882{
    883883    // FIXME: Implement.
    884884}
    885885
    886 void TestRunner::observeStorageTrackerNotifications(unsigned number)
     886void TestRunnerQt::observeStorageTrackerNotifications(unsigned number)
    887887{
    888888    // FIXME: Implement.
    889889}
    890890
    891 void TestRunner::syncLocalStorage()
     891void TestRunnerQt::syncLocalStorage()
    892892{
    893893    // FIXME: Implement.
    894894}
    895895
    896 void TestRunner::resetPageVisibility()
     896void TestRunnerQt::resetPageVisibility()
    897897{
    898898    // FIXME: Implement this.
    899899}
    900900
    901 void TestRunner::setPageVisibility(const char*)
     901void TestRunnerQt::setPageVisibility(const char*)
    902902{
    903903    // FIXME: Implement this.
    904904}
    905905
    906 void TestRunner::setAutomaticLinkDetectionEnabled(bool)
     906void TestRunnerQt::setAutomaticLinkDetectionEnabled(bool)
    907907{
    908908    // FIXME: Implement this.
    909909}
    910910
    911 void TestRunner::setTextDirection(const QString& directionName)
     911void TestRunnerQt::setTextDirection(const QString& directionName)
    912912{
    913913    if (directionName == "auto")
     
    919919}
    920920
    921 void TestRunner::setAlwaysAcceptCookies(bool accept)
     921void TestRunnerQt::setAlwaysAcceptCookies(bool accept)
    922922{
    923923    QWebSettings* globalSettings = QWebSettings::globalSettings();
     
    930930}
    931931
    932 void TestRunner::setAlwaysBlockCookies(bool block)
     932void TestRunnerQt::setAlwaysBlockCookies(bool block)
    933933{
    934934    QWebSettings* globalSettings = QWebSettings::globalSettings();
     
    939939}
    940940
    941 void TestRunner::setAudioData(const QByteArray& audioData)
     941void TestRunnerQt::setAudioData(const QByteArray& audioData)
    942942{
    943943    m_audioData = audioData;
     
    945945}
    946946
    947 const unsigned TestRunner::maxViewWidth = 800;
    948 const unsigned TestRunner::maxViewHeight = 600;
     947const unsigned TestRunnerQt::maxViewWidth = 800;
     948const unsigned TestRunnerQt::maxViewHeight = 600;
  • trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h

    r142509 r142972  
    5454}
    5555
    56 class TestRunner : public QObject {
     56class TestRunnerQt : public QObject {
    5757    Q_OBJECT
    5858    Q_PROPERTY(int webHistoryItemCount READ webHistoryItemCount)
    5959    Q_PROPERTY(bool globalFlag READ globalFlag WRITE setGlobalFlag)
    6060public:
    61     TestRunner(WebCore::DumpRenderTree*);
     61    TestRunnerQt(WebCore::DumpRenderTree*);
    6262
    6363    bool shouldDisallowIncreaseForApplicationCacheQuota() const { return m_disallowIncreaseForApplicationCacheQuota; }
Note: See TracChangeset for help on using the changeset viewer.