[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 11:19:28 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit abb1f08c5e564d6f2d4836d474c4ca96856fb069
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jul 19 16:21:26 2010 +0000
When dumping a response's MIME type, print its URL's last path component rather than its suitable-for-test-result form
This matches the Mac behavior.
Fixes <http://webkit.org/b/42276>
http/tests/loading/preload-slow-loading.php and
http/tests/mime/uppercase-mime-type.html fail on Windows
Reviewed by Anders Carlsson.
* DumpRenderTree/win/DumpRenderTree.cpp:
(urlSuitableForTestResult): Moved code to actually extract the last
path component from here...
(lastPathComponent): ...to here.
* DumpRenderTree/win/DumpRenderTreeWin.h: Added lastPathComponent.
* DumpRenderTree/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::didReceiveResponse): Use the URL's last path
component, rather than its suitable-for-test-result form, to match
Mac.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 92ca433..e4156ed 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,28 @@
+2010-07-19 Adam Roben <aroben at apple.com>
+
+ When dumping a response's MIME type, print its URL's last path
+ component rather than its suitable-for-test-result form
+
+ This matches the Mac behavior.
+
+ Fixes <http://webkit.org/b/42276>
+ http/tests/loading/preload-slow-loading.php and
+ http/tests/mime/uppercase-mime-type.html fail on Windows
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (urlSuitableForTestResult): Moved code to actually extract the last
+ path component from here...
+ (lastPathComponent): ...to here.
+
+ * DumpRenderTree/win/DumpRenderTreeWin.h: Added lastPathComponent.
+
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::didReceiveResponse): Use the URL's last path
+ component, rather than its suitable-for-test-result form, to match
+ Mac.
+
2010-07-19 Anders carlsson <andersca at apple.com>
Reviewed by Adam Roben.
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
index acc0771..a1b72e1 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -134,7 +134,15 @@ bool setAlwaysAcceptCookies(bool alwaysAcceptCookies)
wstring urlSuitableForTestResult(const wstring& url)
{
- if (!url.c_str() || url.find(L"file://") == wstring::npos)
+ if (url.find(L"file://") == wstring::npos)
+ return url;
+
+ return lastPathComponent(url);
+}
+
+wstring lastPathComponent(const wstring& url)
+{
+ if (url.empty())
return url;
return PathFindFileNameW(url.c_str());
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
index cc4337b..e3497c9 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTreeWin.h
@@ -49,6 +49,7 @@ extern HWND webViewWindow;
#include <wtf/Vector.h>
std::wstring urlSuitableForTestResult(const std::wstring& url);
+std::wstring lastPathComponent(const std::wstring&);
std::string toUTF8(BSTR);
std::string toUTF8(const std::wstring&);
IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow = 0);
diff --git a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
index 49231bd..33ccd7f 100644
--- a/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
+++ b/WebKitTools/DumpRenderTree/win/ResourceLoadDelegate.cpp
@@ -333,10 +333,10 @@ HRESULT STDMETHODCALLTYPE ResourceLoadDelegate::didReceiveResponse(
if (FAILED(response->URL(&urlBSTR)))
E_FAIL;
- wstring url = urlSuitableForTestResult(wstringFromBSTR(urlBSTR));
+ wstring url = wstringFromBSTR(urlBSTR);
::SysFreeString(urlBSTR);
- printf("%S has MIME type %S\n", url.c_str(), mimeType.c_str());
+ printf("%S has MIME type %S\n", lastPathComponent(url).c_str(), mimeType.c_str());
}
return S_OK;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list