Changeset 147543 in webkit
- Timestamp:
- Apr 3, 2013 5:33:41 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r147540 r147543 1 2013-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 1 16 2013-04-03 Tor Arne Vestbø <tor.arne.vestbo@digia.com> 2 17 -
trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
r146976 r147543 420 420 { 421 421 DumpRenderTreeSupportQt::webInspectorExecuteScript(m_drt->pageAdapter(), callId, script); 422 }423 424 void TestRunnerQt::goBack()425 {426 DumpRenderTreeSupportQt::goBack(m_drt->pageAdapter());427 422 } 428 423 … … 747 742 } 748 743 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 765 744 void TestRunnerQt::removeAllVisitedLinks() 766 745 { … … 773 752 { 774 753 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);785 754 } 786 755 … … 860 829 } 861 830 862 void TestRunner::setTextDirection(JSStringRef) 863 { 831 void 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); 864 840 } 865 841 … … 991 967 void TestRunner::goBack() 992 968 { 969 DumpRenderTreeSupportQt::goBack(DumpRenderTree::instance()->pageAdapter()); 993 970 } 994 971 … … 1200 1177 void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script) 1201 1178 { 1179 DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(DumpRenderTree::instance()->mainFrameAdapter(), worldID, JSStringCopyQString(script)); 1202 1180 } 1203 1181 … … 1213 1191 void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames) 1214 1192 { 1193 DumpRenderTreeSupportQt::addUserStyleSheet(DumpRenderTree::instance()->pageAdapter(), JSStringCopyQString(source)); 1215 1194 } 1216 1195 -
trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h
r146976 r147543 180 180 bool geolocationPermission() const { return m_geolocationPermission; } 181 181 182 void startSpeechInput(const QString& inputElement);183 184 182 void addURLToRedirect(const QString& origin, const QString& destination); 185 183 … … 190 188 void setScrollbarPolicy(const QString& orientation, const QString& policy); 191 189 192 void evaluateScriptInIsolatedWorld(int worldID, const QString& script);193 void addUserStyleSheet(const QString& sourceCode);194 195 void setTextDirection(const QString& directionName);196 void goBack();197 190 void setDefersLoading(bool); 198 191 void setAlwaysAcceptCookies(bool);
Note: See TracChangeset
for help on using the changeset viewer.