Title: [222355] trunk
- Revision
- 222355
- Author
- [email protected]
- Date
- 2017-09-21 15:08:39 -0700 (Thu, 21 Sep 2017)
Log Message
Regression(r222308): new API tests are failing for !NETWORK_SESSION
https://bugs.webkit.org/show_bug.cgi?id=177321
Reviewed by Alex Christensen.
Source/WebKit:
When a load is redirected and then converted into a download, CFNetwork
seems to call [NSURLDownloadDelegate willSendRequest:] on the download
with a non-nil redirectResponse, which was unexpected.
To address the issue, we now ignore the willSendRequest call if the
new request's URL is the same as the redirectResponse one.
* NetworkProcess/Downloads/mac/DownloadMac.mm:
(-[WKDownloadAsDelegate download:willSendRequest:redirectResponse:]):
Tools:
Unskip API tests now that they pass everywhere.
* TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
(TEST):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (222354 => 222355)
--- trunk/Source/WebKit/ChangeLog 2017-09-21 21:58:39 UTC (rev 222354)
+++ trunk/Source/WebKit/ChangeLog 2017-09-21 22:08:39 UTC (rev 222355)
@@ -1,5 +1,22 @@
2017-09-21 Chris Dumez <[email protected]>
+ Regression(r222308): new API tests are failing for !NETWORK_SESSION
+ https://bugs.webkit.org/show_bug.cgi?id=177321
+
+ Reviewed by Alex Christensen.
+
+ When a load is redirected and then converted into a download, CFNetwork
+ seems to call [NSURLDownloadDelegate willSendRequest:] on the download
+ with a non-nil redirectResponse, which was unexpected.
+
+ To address the issue, we now ignore the willSendRequest call if the
+ new request's URL is the same as the redirectResponse one.
+
+ * NetworkProcess/Downloads/mac/DownloadMac.mm:
+ (-[WKDownloadAsDelegate download:willSendRequest:redirectResponse:]):
+
+2017-09-21 Chris Dumez <[email protected]>
+
Unreviewed, drop assertion added in r222308.
The assertion is hit by a couple of tests still but there is no bad effect
Modified: trunk/Source/WebKit/NetworkProcess/Downloads/mac/DownloadMac.mm (222354 => 222355)
--- trunk/Source/WebKit/NetworkProcess/Downloads/mac/DownloadMac.mm 2017-09-21 21:58:39 UTC (rev 222354)
+++ trunk/Source/WebKit/NetworkProcess/Downloads/mac/DownloadMac.mm 2017-09-21 22:08:39 UTC (rev 222355)
@@ -209,7 +209,7 @@
- (NSURLRequest *)download:(NSURLDownload *)download willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse
{
dispatchOnMainThread(^ {
- if (_download && redirectResponse)
+ if (_download && redirectResponse && ![request.URL isEqual:redirectResponse.URL])
_download->willSendRedirectedRequest(request, redirectResponse);
});
return request;
Modified: trunk/Tools/ChangeLog (222354 => 222355)
--- trunk/Tools/ChangeLog 2017-09-21 21:58:39 UTC (rev 222354)
+++ trunk/Tools/ChangeLog 2017-09-21 22:08:39 UTC (rev 222355)
@@ -1,3 +1,15 @@
+2017-09-21 Chris Dumez <[email protected]>
+
+ Regression(r222308): new API tests are failing for !NETWORK_SESSION
+ https://bugs.webkit.org/show_bug.cgi?id=177321
+
+ Reviewed by Alex Christensen.
+
+ Unskip API tests now that they pass everywhere.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
+ (TEST):
+
2017-09-21 Filip Pizlo <[email protected]>
Unreviewed, fix ability to run tests in browser.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm (222354 => 222355)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm 2017-09-21 21:58:39 UTC (rev 222354)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm 2017-09-21 22:08:39 UTC (rev 222355)
@@ -525,8 +525,7 @@
[TestProtocol unregister];
}
-// FIXME: Re-enable once it passes on El Capitan (https://bugs.webkit.org/show_bug.cgi?id=177321).
-TEST(_WKDownload, DISABLED_RedirectedLoadConvertedToDownload)
+TEST(_WKDownload, RedirectedLoadConvertedToDownload)
{
[TestProtocol registerWithScheme:@"http"];
@@ -548,8 +547,7 @@
[TestProtocol unregister];
}
-// FIXME: Re-enable once it passes on El Capitan (https://bugs.webkit.org/show_bug.cgi?id=177321).
-TEST(_WKDownload, DISABLED_RedirectedSubframeLoadConvertedToDownload)
+TEST(_WKDownload, RedirectedSubframeLoadConvertedToDownload)
{
[TestProtocol registerWithScheme:@"http"];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes