Changeset 125031 in webkit
- Timestamp:
- Aug 8, 2012 6:18:18 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r125030 r125031 1 2012-08-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 3 [WK2] [WTR] Provide Resource Response dumping. 4 https://bugs.webkit.org/show_bug.cgi?id=93454 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Several new getter functions were added to WKURLResponse and WKURL, so that WTR has 9 necessary data for dumping. 10 11 * Shared/API/c/WKURL.cpp: 12 (WKURLCopyLastPathComponent): 13 * Shared/API/c/WKURL.h: 14 * Shared/API/c/WKURLResponse.cpp: 15 (WKURLResponseCopyURL): Returns URL of the response. 16 (WKURLResponseCopyMimeType): Returns MIME type of the response. 17 * Shared/API/c/WKURLResponse.h: 18 * Shared/WebURL.h: 19 (WebKit::WebURL::lastPathComponent): Returns last path component of the URL. 20 (WebURL): 21 1 22 2012-08-08 Eunmi Lee <eunmi15.lee@samsung.com> 2 23 -
trunk/Source/WebKit2/Shared/API/c/WKURL.cpp
r95901 r125031 60 60 return toCopiedAPI(toImpl(url)->protocol()); 61 61 } 62 63 WKStringRef WKURLCopyLastPathComponent(WKURLRef url) 64 { 65 return toCopiedAPI(toImpl(url)->lastPathComponent()); 66 } -
trunk/Source/WebKit2/Shared/API/c/WKURL.h
r95901 r125031 40 40 WK_EXPORT WKStringRef WKURLCopyHostName(WKURLRef url); 41 41 WK_EXPORT WKStringRef WKURLCopyScheme(WKURLRef url); 42 WK_EXPORT WKStringRef WKURLCopyLastPathComponent(WKURLRef url); 42 43 43 44 WK_EXPORT bool WKURLIsEqual(WKURLRef a, WKURLRef b); -
trunk/Source/WebKit2/Shared/API/c/WKURLResponse.cpp
r95901 r125031 29 29 #include "WKAPICast.h" 30 30 #include "WebURLResponse.h" 31 #include <WebCore/KURL.h> 31 32 32 33 using namespace WebKit; … … 37 38 } 38 39 40 WKURLRef WKURLResponseCopyURL(WKURLResponseRef responseRef) 41 { 42 return toCopiedURLAPI(toImpl(responseRef)->resourceResponse().url()); 43 } 44 45 WKStringRef WKURLResponseCopyMimeType(WKURLResponseRef responseRef) 46 { 47 return toCopiedAPI(toImpl(responseRef)->resourceResponse().mimeType()); 48 } -
trunk/Source/WebKit2/Shared/API/c/WKURLResponse.h
r95901 r125031 35 35 WK_EXPORT WKTypeID WKURLResponseGetTypeID(); 36 36 37 WK_EXPORT WKURLRef WKURLResponseCopyURL(WKURLResponseRef); 38 39 WK_EXPORT WKStringRef WKURLResponseCopyMimeType(WKURLResponseRef); 40 37 41 #ifdef __cplusplus 38 42 } -
trunk/Source/WebKit2/Shared/WebURL.h
r95901 r125031 64 64 } 65 65 66 String lastPathComponent() const 67 { 68 parseURLIfNecessary(); 69 return m_parsedURL->isValid() ? m_parsedURL->lastPathComponent() : String(); 70 } 71 66 72 private: 67 73 WebURL(const String& string) -
trunk/Tools/ChangeLog
r125023 r125031 1 2012-08-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 3 [WK2] [WTR] Provide Resource Response dumping. 4 https://bugs.webkit.org/show_bug.cgi?id=93454 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Added missing dumpResourceResponseMIMETypes() method to testRunner. Provided resource response dumping. 9 10 * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: 11 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 12 (WTR::InjectedBundlePage::didReceiveResponseForResource): 13 * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: 14 (WTR::LayoutTestController::LayoutTestController): 15 * WebKitTestRunner/InjectedBundle/LayoutTestController.h: 16 (WTR::LayoutTestController::dumpProgressFinishedCallback): 17 (WTR::LayoutTestController::dumpResourceResponseMIMETypes): 18 (WTR::LayoutTestController::shouldDumpResourceResponseMIMETypes): 19 (LayoutTestController): 20 1 21 2012-08-08 Simon Hausmann <simon.hausmann@nokia.com> 2 22 -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
r124477 r125031 45 45 void dumpFrameLoadCallbacks(); 46 46 void dumpProgressFinishedCallback(); 47 void dumpResourceResponseMIMETypes(); 47 48 48 49 // Special options. -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r124770 r125031 991 991 } 992 992 993 void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t, WKURLResponseRef) 994 { 993 void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t, WKURLResponseRef response) 994 { 995 if (!InjectedBundle::shared().isTestRunning()) 996 return; 997 998 if (!InjectedBundle::shared().layoutTestController()->shouldDumpResourceResponseMIMETypes()) 999 return; 1000 1001 WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response)); 1002 WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyLastPathComponent(url.get())); 1003 WKRetainPtr<WKStringRef> mimeTypeString = adoptWK(WKURLResponseCopyMimeType(response)); 1004 1005 InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString)); 1006 InjectedBundle::shared().stringBuilder()->append(" has MIME type "); 1007 InjectedBundle::shared().stringBuilder()->append(toWTFString(mimeTypeString)); 1008 InjectedBundle::shared().stringBuilder()->append("\n"); 995 1009 } 996 1010 -
trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
r124705 r125031 78 78 , m_dumpFrameLoadCallbacks(false) 79 79 , m_dumpProgressFinishedCallback(false) 80 , m_dumpResourceResponseMIMETypes(false) 80 81 , m_waitToDump(false) 81 82 , m_testRepaint(false) -
trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
r125019 r125031 79 79 void dumpFullScreenCallbacks() { m_dumpFullScreenCallbacks = true; } 80 80 void dumpFrameLoadCallbacks() { setShouldDumpFrameLoadCallbacks(true); } 81 void dumpProgressFinishedCallback() { setShouldDumpProgressFinishedCallback(true); } 81 void dumpProgressFinishedCallback() { setShouldDumpProgressFinishedCallback(true); } 82 void dumpResourceResponseMIMETypes() { m_dumpResourceResponseMIMETypes = true; } 82 83 83 84 void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; } … … 163 164 bool shouldDumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; } 164 165 bool shouldDumpProgressFinishedCallback() const { return m_dumpProgressFinishedCallback; } 166 bool shouldDumpResourceResponseMIMETypes() const { return m_dumpResourceResponseMIMETypes; } 167 165 168 bool isPolicyDelegateEnabled() const { return m_policyDelegateEnabled; } 166 169 bool isPolicyDelegatePermissive() const { return m_policyDelegatePermissive; } … … 247 250 bool m_dumpFrameLoadCallbacks; 248 251 bool m_dumpProgressFinishedCallback; 252 bool m_dumpResourceResponseMIMETypes; 249 253 bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called. 250 254 bool m_testRepaint;
Note: See TracChangeset
for help on using the changeset viewer.