Changeset 32543
- Timestamp:
- 04/25/08 00:53:18 (23 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
WebKit/qt/ChangeLog (modified) (1 diff)
-
WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (modified) (4 diffs)
-
WebKitTools/ChangeLog (modified) (1 diff)
-
WebKitTools/DumpRenderTree/qt/jsobjects.cpp (modified) (2 diffs)
-
WebKitTools/DumpRenderTree/qt/jsobjects.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/ChangeLog
r32498 r32543 1 2008-04-25 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Simon. 4 5 Implement dumping of resource load callbacks to pass http/tests/xmlhttprequest/abort-should-cancel-load.html 6 7 Similar to Editing and Frameloading we do the dumping within WebCore 8 9 10 * WebCoreSupport/FrameLoaderClientQt.cpp: 11 (qt_dump_frame_loader): 12 (qt_dump_resource_load_callbacks): 13 (drtDescriptionSuitableForTestResult): 14 (WebCore::FrameLoaderClientQt::dispatchDidFailLoading): 15 (WebCore::FrameLoaderClientQt::dispatchDidLoadResourceFromMemoryCache): 16 (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType): 17 1 18 2008-04-24 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r32479 r32543 67 67 68 68 static bool dumpFrameLoaderCallbacks = false; 69 static bool dumpResourceLoadCallbacks = false; 70 71 static QMap<unsigned long, QString> dumpAssignedUrls; 69 72 70 73 void QWEBKIT_EXPORT qt_dump_frame_loader(bool b) 71 74 { 72 75 dumpFrameLoaderCallbacks = b; 76 } 77 78 void QWEBKIT_EXPORT qt_dump_resource_load_callbacks(bool b) 79 { 80 dumpResourceLoadCallbacks = b; 73 81 } 74 82 … … 95 103 QUrl url = _url; 96 104 return url.toString(); 105 } 106 107 static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceError& error) 108 { 109 QString failingURL = error.failingURL(); 110 return QString::fromLatin1("<NSError domain NSURLErrorDomain, code %1, failing URL \"%2\">").arg(error.errorCode()).arg(failingURL); 111 } 112 113 static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceRequest& request) 114 { 115 QString url = request.url().string(); 116 return QString::fromLatin1("<NSURLRequest %1>").arg(url); 117 } 118 119 static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceResponse& response) 120 { 121 QString text = response.httpStatusText(); 122 if (text.isEmpty()) 123 return QLatin1String("(null)"); 124 125 return text; 97 126 } 98 127 … … 700 729 } 701 730 702 void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader*, const WebCore::ResourceRequest&) 703 { 704 } 705 706 void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response) 707 { 731 void FrameLoaderClientQt::assignIdentifierToInitialRequest(unsigned long identifier, WebCore::DocumentLoader* loader, const WebCore::ResourceRequest& request) 732 { 733 if (dumpResourceLoadCallbacks) 734 dumpAssignedUrls[identifier] = drtDescriptionSuitableForTestResult(request.url()); 735 } 736 737 void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, unsigned long identifier, WebCore::ResourceRequest& newRequest, const WebCore::ResourceResponse& redirectResponse) 738 { 739 if (dumpResourceLoadCallbacks) 740 printf("%s - willSendRequest %s redirectResponse %s\n", 741 qPrintable(dumpAssignedUrls[identifier]), 742 qPrintable(drtDescriptionSuitableForTestResult(newRequest)), 743 qPrintable(drtDescriptionSuitableForTestResult(redirectResponse))); 744 708 745 // seems like the Mac code doesn't do anything here by default neither 709 746 //qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().string`(); … … 736 773 } 737 774 738 void FrameLoaderClientQt::dispatchDidFailLoading(WebCore::DocumentLoader* loader, unsigned long, const WebCore::ResourceError&) 739 { 775 void FrameLoaderClientQt::dispatchDidFailLoading(WebCore::DocumentLoader* loader, unsigned long identifier, const WebCore::ResourceError& error) 776 { 777 if (dumpResourceLoadCallbacks) 778 printf("%s - didFailLoadingWithError: %s\n", qPrintable(dumpAssignedUrls[identifier]), qPrintable(drtDescriptionSuitableForTestResult(error))); 779 740 780 if (m_firstData) { 741 781 FrameLoader *fl = loader->frameLoader(); -
trunk/WebKitTools/ChangeLog
r32527 r32543 1 2008-04-25 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Simon. 4 5 Implement dumping of resource load callbacks to pass http/tests/xmlhttprequest/abort-should-cancel-load.html 6 7 Similar to Editing and Frameloading we do the dumping within WebCore 8 9 10 * DumpRenderTree/qt/jsobjects.cpp: 11 (LayoutTestController::dumpResourceLoadCallbacks): 12 * DumpRenderTree/qt/jsobjects.h: 13 1 14 2008-04-24 Jan Michael Alonzo <jmalonzo@unpluggable.com> 2 15 -
trunk/WebKitTools/DumpRenderTree/qt/jsobjects.cpp
r29729 r32543 36 36 #include "DumpRenderTree.h" 37 37 extern void qt_dump_editing_callbacks(bool b); 38 extern void qt_dump_resource_load_callbacks(bool b); 38 39 39 40 LayoutTestController::LayoutTestController(WebCore::DumpRenderTree *drt) … … 108 109 qDebug() << ">>>dumpEditingCallbacks"; 109 110 qt_dump_editing_callbacks(true); 111 } 112 113 void LayoutTestController::dumpResourceLoadCallbacks() 114 { 115 qt_dump_resource_load_callbacks(true); 110 116 } 111 117 -
trunk/WebKitTools/DumpRenderTree/qt/jsobjects.h
r29729 r32543 69 69 void notifyDone(); 70 70 void dumpEditingCallbacks(); 71 void dumpResourceLoadCallbacks(); 71 72 void queueReload(); 72 73 void provisionalLoad();