Changeset 287365 in webkit
- Timestamp:
- Dec 22, 2021, 10:52:52 AM (4 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r287360 r287365 1 2021-12-22 Alex Christensen <achristensen@webkit.org> 2 3 Re-enable WebpagePreferences.WebsitePoliciesDuringRedirect API test on Monterey 4 https://bugs.webkit.org/show_bug.cgi?id=234607 5 6 Reviewed by Brady Eidson. 7 8 This is the same as r285057 where we were responding with one byte short of the ranges requested, 9 which used to give a playing event but since Monterey it doesn't. The fix is to respond with all 10 the bytes requested. If the request is for bytes 0-1, we need to respond with two bytes, for example. 11 12 * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: 13 (-[TestSchemeHandler webView:startURLSchemeTask:]): 14 (TEST): 15 1 16 2021-12-22 J Pascoe <j_pascoe@apple.com> 2 17 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm
r287298 r287365 696 696 auto& range = *parsedRange.range; 697 697 698 NSDictionary *headerFields = @{ @"Content-Length": [@(range.second - range.first ) stringValue], @"Content-Range": [NSString stringWithFormat:@"bytes %lu-%lu/%lu", range.first, range.second, [videoData length]] };698 NSDictionary *headerFields = @{ @"Content-Length": [@(range.second - range.first + 1) stringValue], @"Content-Range": [NSString stringWithFormat:@"bytes %lu-%lu/%lu", range.first, range.second, [videoData length]] }; 699 699 auto response = adoptNS([[NSHTTPURLResponse alloc] initWithURL:task.request.URL statusCode:200 HTTPVersion:(NSString *)kCFHTTPVersion1_1 headerFields:headerFields]); 700 700 [task didReceiveResponse:response.get()]; 701 [task didReceiveData:[videoData subdataWithRange:NSMakeRange(range.first, range.second - range.first )]];701 [task didReceiveData:[videoData subdataWithRange:NSMakeRange(range.first, range.second - range.first + 1)]]; 702 702 [task didFinish]; 703 703 … … 710 710 @end 711 711 712 // FIXME: Re-enable this test for Monterey+ once rdar://80476146 is resolved.713 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000714 TEST(WebpagePreferences, DISABLED_WebsitePoliciesDuringRedirect)715 #else716 712 TEST(WebpagePreferences, WebsitePoliciesDuringRedirect) 717 #endif718 713 { 719 714 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
Note:
See TracChangeset
for help on using the changeset viewer.