Changeset 80319 in webkit
- Timestamp:
- Mar 3, 2011 9:13:10 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r80318 r80319 1 2011-03-03 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [QT] Implement mock client-based geolocation for layout testing 6 https://bugs.webkit.org/show_bug.cgi?id=54334 7 8 Re-enable geolocation layout testing for qt port. Also enable a long pending 9 failure with geolocation as it works with client-based geolocation. 10 Skipped one last case related to multiple window which needs some code cleanup in qt DRT. 11 12 * platform/qt/Skipped: 13 1 14 2011-03-03 Fumitoshi Ukai <ukai@chromium.org> 2 15 -
trunk/LayoutTests/platform/qt/Skipped
r80250 r80319 2887 2887 # new skipped tests yet to be sorted 2888 2888 # ============================================================================= # 2889 fast/dom/Geolocation/callback-to-remote-context2.html2890 2889 2891 2890 # Link prefetch is disabled by default … … 3164 3163 editing/selection/mixed-editability-10.html 3165 3164 3166 # ----- FIXME: QtWebkit supports client based and LayoutTest for the same is yet to be implemented. Tracked in #54334 ------3167 fast/dom/Geolocation3168 fast/dom/Window/window-properties-geolocation.html3169 3170 3165 # [Qt] Generate results for media/audio-repaint.html and media/media-document-audio-repaint.html 3171 3166 # https://bugs.webkit.org/show_bug.cgi?id=54984 … … 3187 3182 http/tests/xmlviewer/dumpAsText/xsl-stylesheet.xml 3188 3183 http/tests/xmlviewer/dumpAsText/xul.xml 3184 3185 # [Qt] geolocation case failing as needs implementation in DumpRenderTree : TODO bug 3186 fast/dom/Geolocation/window-close-crash.html -
trunk/Source/WebCore/ChangeLog
r80317 r80319 1 2011-03-03 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [QT] Implement mock client-based geolocation for layout testing 6 https://bugs.webkit.org/show_bug.cgi?id=54334 7 8 Implements client() to GeolocationController to re-use geolocationClientMock class 9 for layout testing purpose. 10 11 * page/GeolocationController.h: 12 (WebCore::GeolocationController::client): 13 1 14 2011-03-03 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/Source/WebCore/page/GeolocationController.h
r76248 r80319 58 58 GeolocationPosition* lastPosition(); 59 59 60 GeolocationClient* client() { return m_client; } 61 60 62 private: 61 63 Page* m_page; -
trunk/Source/WebKit/qt/Api/qwebpage.cpp
r80218 r80319 63 63 #include "FrameTree.h" 64 64 #include "FrameView.h" 65 66 #i f ENABLE(GEOLOCATION)65 #if ENABLE(CLIENT_BASED_GEOLOCATION) 66 #include "GeolocationClientMock.h" 67 67 #include "GeolocationClientQt.h" 68 #endif 69 68 #endif // CLIENT_BASED_GEOLOCATION 70 69 #include "GeolocationPermissionClientQt.h" 71 70 #include "HTMLFormElement.h" … … 328 327 pageClients.deviceMotionClient = new DeviceMotionClientQt(q); 329 328 #endif 330 #if ENABLE(GEOLOCATION) 331 pageClients.geolocationClient = new GeolocationClientQt(q); 329 #if ENABLE(CLIENT_BASED_GEOLOCATION) 330 if (QWebPagePrivate::drtRun) 331 pageClients.geolocationClient = new GeolocationClientMock(); 332 else 333 pageClients.geolocationClient = new GeolocationClientQt(q); 332 334 #endif 333 335 page = new Page(pageClients); 334 336 337 #if ENABLE(CLIENT_BASED_GEOLOCATION) 338 // In case running in DumpRenderTree mode set the controller to mock provider. 339 if (QWebPagePrivate::drtRun) 340 static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(page->geolocationController()); 341 #endif 335 342 settings = new QWebSettings(page->settings()); 336 343 -
trunk/Source/WebKit/qt/ChangeLog
r80314 r80319 1 2011-03-03 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [QT] Implement mock client-based geolocation for layout testing 6 https://bugs.webkit.org/show_bug.cgi?id=54334 7 8 Implement layout testing for Client-Based geolocation. If drt_run is set 9 then create mock geolocationClient and update the same with controller. 10 11 * Api/qwebpage.cpp: 12 (QWebPagePrivate::QWebPagePrivate): 13 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 14 (DumpRenderTreeSupportQt::mockGeolocationReset): 15 (DumpRenderTreeSupportQt::setMockGeolocationPermission): 16 (DumpRenderTreeSupportQt::setMockGeolocationPosition): 17 (DumpRenderTreeSupportQt::setMockGeolocationError): 18 * WebCoreSupport/DumpRenderTreeSupportQt.h: 19 * WebCoreSupport/GeolocationClientQt.cpp: 20 (WebCore::GeolocationClientQt::GeolocationClientQt): 21 * WebCoreSupport/GeolocationClientQt.h: 22 1 23 2011-03-03 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 24 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r80077 r80319 46 46 #include "V8Proxy.h" 47 47 #endif 48 #include "Geolocation.h" 49 #include "GeolocationServiceMock.h" 50 #include "Geoposition.h" 48 #include "GeolocationClient.h" 49 #include "GeolocationClientMock.h" 50 #include "GeolocationController.h" 51 #include "GeolocationError.h" 52 #include "GeolocationPosition.h" 51 53 #include "HistoryItem.h" 52 54 #include "HTMLInputElement.h" … … 90 92 QMap<int, QWebScriptWorld*> m_worldMap; 91 93 94 #if ENABLE(CLIENT_BASED_GEOLOCATION) 95 GeolocationClientMock* toGeolocationClientMock(GeolocationClient* client) 96 { 97 ASSERT(QWebPagePrivate::drtRun); 98 return static_cast<GeolocationClientMock*>(client); 99 } 100 #endif 101 92 102 QDRTNode::QDRTNode() 93 103 : m_node(0) … … 765 775 } 766 776 767 void DumpRenderTreeSupportQt::setMockGeolocationPosition(double latitude, double longitude, double accuracy) 768 { 769 #if ENABLE(GEOLOCATION) 770 RefPtr<Geoposition> geoposition = Geoposition::create(Coordinates::create(latitude, longitude, false, 0, accuracy, true, 0, false, 0, false, 0), currentTime() * 1000.0); 771 GeolocationServiceMock::setPosition(geoposition); 772 #endif 773 } 774 775 void DumpRenderTreeSupportQt::setMockGeolocationError(int errorCode, const QString& message) 776 { 777 #if ENABLE(GEOLOCATION) 778 RefPtr<PositionError> positionError = PositionError::create(static_cast<PositionError::ErrorCode>(errorCode), message); 779 GeolocationServiceMock::setError(positionError); 777 void DumpRenderTreeSupportQt::resetGeolocationMock(QWebPage* page) 778 { 779 #if ENABLE(CLIENT_BASED_GEOLOCATION) 780 Page* corePage = QWebPagePrivate::core(page); 781 GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client()); 782 mockClient->reset(); 783 #endif 784 } 785 786 void DumpRenderTreeSupportQt::setMockGeolocationPermission(QWebPage* page, bool allowed) 787 { 788 #if ENABLE(CLIENT_BASED_GEOLOCATION) 789 Page* corePage = QWebPagePrivate::core(page); 790 GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client()); 791 mockClient->setPermission(allowed); 792 #endif 793 } 794 795 void DumpRenderTreeSupportQt::setMockGeolocationPosition(QWebPage* page, double latitude, double longitude, double accuracy) 796 { 797 #if ENABLE(CLIENT_BASED_GEOLOCATION) 798 Page* corePage = QWebPagePrivate::core(page); 799 GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client()); 800 mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy)); 801 #endif 802 } 803 804 void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorCode, const QString& message) 805 { 806 #if ENABLE(CLIENT_BASED_GEOLOCATION) 807 Page* corePage = QWebPagePrivate::core(page); 808 809 GeolocationError::ErrorCode code = GeolocationError::PositionUnavailable; 810 switch (errorCode) { 811 case PositionError::PERMISSION_DENIED: 812 code = GeolocationError::PermissionDenied; 813 break; 814 case PositionError::POSITION_UNAVAILABLE: 815 code = GeolocationError::PositionUnavailable; 816 break; 817 } 818 819 GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(corePage->geolocationController()->client()); 820 mockClient->setError(GeolocationError::create(code, message)); 780 821 #endif 781 822 } -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r79793 r80319 144 144 static void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma); 145 145 146 static void setMockGeolocationPosition(double latitude, double longitude, double accuracy); 147 static void setMockGeolocationError(int errorCode, const QString& message); 146 static void resetGeolocationMock(QWebPage*); 147 static void setMockGeolocationPermission(QWebPage*, bool allowed); 148 static void setMockGeolocationPosition(QWebPage*, double latitude, double longitude, double accuracy); 149 static void setMockGeolocationError(QWebPage*, int errorCode, const QString& message); 148 150 149 151 static int workerThreadCount(); -
trunk/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
r79028 r80319 44 44 static const char failedToStartServiceErrorMessage[] = "Failed to start Geolocation service"; 45 45 46 GeolocationClientQt::GeolocationClientQt( QWebPage* page)46 GeolocationClientQt::GeolocationClientQt(const QWebPage* page) 47 47 : m_page(page) 48 48 , m_lastPosition(0) -
trunk/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
r79028 r80319 46 46 47 47 public: 48 GeolocationClientQt( QWebPage*);48 GeolocationClientQt(const QWebPage*); 49 49 virtual ~GeolocationClientQt(); 50 50 … … 64 64 65 65 private: 66 QWebPage* m_page;66 const QWebPage* m_page; 67 67 RefPtr<GeolocationPosition> m_lastPosition; 68 68 QtMobility::QGeoPositionInfoSource* m_location; -
trunk/Tools/ChangeLog
r80301 r80319 1 2011-03-03 Mahesh Kulkarni <mahesh.kulkarni@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [QT] Implement mock client-based geolocation for layout testing 6 https://bugs.webkit.org/show_bug.cgi?id=54334 7 8 Implement testing for Client-Based geolocation for QtWebkit. 9 10 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 11 (WebCore::DumpRenderTree::DumpRenderTree): 12 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 13 (LayoutTestController::reset): 14 (LayoutTestController::setGeolocationPermission): 15 (LayoutTestController::setMockGeolocationError): 16 (LayoutTestController::setMockGeolocationPosition): 17 1 18 2011-03-03 Sheriff Bot <webkit.review.bot@gmail.com> 2 19 -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r79793 r80319 419 419 , m_persistentStoragePath(QString(getenv("DUMPRENDERTREE_TEMP"))) 420 420 { 421 422 421 QByteArray viewMode = getenv("QT_DRT_WEBVIEW_MODE"); 423 422 if (viewMode == "graphics") 424 423 setGraphicsBased(true); 425 424 425 // Set running in DRT mode for qwebpage to create testable objects. 426 DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(true); 426 427 DumpRenderTreeSupportQt::overwritePluginDirectories(); 427 428 DumpRenderTreeSupportQt::activeMockDeviceOrientationClient(true); -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r80181 r80319 87 87 DumpRenderTreeSupportQt::dumpHistoryCallbacks(false); 88 88 DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(false); 89 DumpRenderTreeSupportQt::resetGeolocationMock(m_drt->webPage()); 89 90 setIconDatabaseEnabled(false); 90 91 clearAllDatabases(); … … 763 764 { 764 765 setGeolocationPermissionCommon(allow); 765 emit geolocationPermissionSet();766 DumpRenderTreeSupportQt::setMockGeolocationPermission(m_drt->webPage(), allow); 766 767 } 767 768 … … 774 775 void LayoutTestController::setMockGeolocationError(int code, const QString& message) 775 776 { 776 DumpRenderTreeSupportQt::setMockGeolocationError( code, message);777 DumpRenderTreeSupportQt::setMockGeolocationError(m_drt->webPage(), code, message); 777 778 } 778 779 779 780 void LayoutTestController::setMockGeolocationPosition(double latitude, double longitude, double accuracy) 780 781 { 781 DumpRenderTreeSupportQt::setMockGeolocationPosition( latitude, longitude, accuracy);782 DumpRenderTreeSupportQt::setMockGeolocationPosition(m_drt->webPage(), latitude, longitude, accuracy); 782 783 } 783 784
Note: See TracChangeset
for help on using the changeset viewer.