Changeset 147543 in webkit


Ignore:
Timestamp:
Apr 3, 2013 5:33:41 AM (11 years ago)
Author:
zeno.albisser@digia.com
Message:

[Qt] Move logic of simple forwarding functions to TestRunner.
https://bugs.webkit.org/show_bug.cgi?id=113863

Reviewed by Simon Hausmann.

  • DumpRenderTree/qt/TestRunnerQt.cpp:

(TestRunner::setTextDirection):
(TestRunner::goBack):
(TestRunner::evaluateScriptInIsolatedWorld):
(TestRunner::addUserStyleSheet):

  • DumpRenderTree/qt/TestRunnerQt.h:

(TestRunnerQt):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r147540 r147543  
     12013-04-03  Zeno Albisser  <zeno@webkit.org>
     2
     3        [Qt] Move logic of simple forwarding functions to TestRunner.
     4        https://bugs.webkit.org/show_bug.cgi?id=113863
     5
     6        Reviewed by Simon Hausmann.
     7
     8        * DumpRenderTree/qt/TestRunnerQt.cpp:
     9        (TestRunner::setTextDirection):
     10        (TestRunner::goBack):
     11        (TestRunner::evaluateScriptInIsolatedWorld):
     12        (TestRunner::addUserStyleSheet):
     13        * DumpRenderTree/qt/TestRunnerQt.h:
     14        (TestRunnerQt):
     15
    1162013-04-03  Tor Arne Vestbø  <tor.arne.vestbo@digia.com>
    217
  • trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp

    r146976 r147543  
    420420{
    421421    DumpRenderTreeSupportQt::webInspectorExecuteScript(m_drt->pageAdapter(), callId, script);
    422 }
    423 
    424 void TestRunnerQt::goBack()
    425 {
    426     DumpRenderTreeSupportQt::goBack(m_drt->pageAdapter());
    427422}
    428423
     
    747742}
    748743
    749 void TestRunnerQt::startSpeechInput(const QString& inputElement)
    750 {
    751     // FIXME: Implement for speech input layout tests.
    752     // See https://bugs.webkit.org/show_bug.cgi?id=39485.
    753 }
    754 
    755 void TestRunnerQt::evaluateScriptInIsolatedWorld(int worldID, const QString& script)
    756 {
    757     DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(m_drt->mainFrameAdapter(), worldID, script);
    758 }
    759 
    760 void TestRunnerQt::addUserStyleSheet(const QString& sourceCode)
    761 {
    762     DumpRenderTreeSupportQt::addUserStyleSheet(m_drt->pageAdapter(), sourceCode);
    763 }
    764 
    765744void TestRunnerQt::removeAllVisitedLinks()
    766745{
     
    773752{
    774753    DumpRenderTreeSupportQt::addURLToRedirect(origin, destination);
    775 }
    776 
    777 void TestRunnerQt::setTextDirection(const QString& directionName)
    778 {
    779     if (directionName == "auto")
    780         m_drt->webPage()->triggerAction(QWebPage::SetTextDirectionDefault);
    781     else if (directionName == "rtl")
    782         m_drt->webPage()->triggerAction(QWebPage::SetTextDirectionRightToLeft);
    783     else if (directionName == "ltr")
    784         m_drt->webPage()->triggerAction(QWebPage::SetTextDirectionLeftToRight);
    785754}
    786755
     
    860829}
    861830
    862 void TestRunner::setTextDirection(JSStringRef)
    863 {
     831void TestRunner::setTextDirection(JSStringRef directionName)
     832{
     833    QWebPage* webPage = DumpRenderTree::instance()->webPage();
     834    if (JSStringIsEqualToUTF8CString(directionName, "auto"))
     835        webPage->triggerAction(QWebPage::SetTextDirectionDefault);
     836    else if (JSStringIsEqualToUTF8CString(directionName, "rtl"))
     837        webPage->triggerAction(QWebPage::SetTextDirectionRightToLeft);
     838    else if (JSStringIsEqualToUTF8CString(directionName, "ltr"))
     839        webPage->triggerAction(QWebPage::SetTextDirectionLeftToRight);
    864840}
    865841
     
    991967void TestRunner::goBack()
    992968{
     969    DumpRenderTreeSupportQt::goBack(DumpRenderTree::instance()->pageAdapter());
    993970}
    994971
     
    12001177void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
    12011178{
     1179    DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(DumpRenderTree::instance()->mainFrameAdapter(), worldID, JSStringCopyQString(script));
    12021180}
    12031181
     
    12131191void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
    12141192{
     1193    DumpRenderTreeSupportQt::addUserStyleSheet(DumpRenderTree::instance()->pageAdapter(), JSStringCopyQString(source));
    12151194}
    12161195
  • trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h

    r146976 r147543  
    180180    bool geolocationPermission() const { return m_geolocationPermission; }
    181181
    182     void startSpeechInput(const QString& inputElement);
    183 
    184182    void addURLToRedirect(const QString& origin, const QString& destination);
    185183
     
    190188    void setScrollbarPolicy(const QString& orientation, const QString& policy);
    191189
    192     void evaluateScriptInIsolatedWorld(int worldID, const QString& script);
    193     void addUserStyleSheet(const QString& sourceCode);
    194    
    195     void setTextDirection(const QString& directionName);
    196     void goBack();
    197190    void setDefersLoading(bool);
    198191    void setAlwaysAcceptCookies(bool);
Note: See TracChangeset for help on using the changeset viewer.