RESOLVED FIXED 223657
[Cocoa] Revise loadSimulatedRequest API with final review comments
https://bugs.webkit.org/show_bug.cgi?id=223657
Summary [Cocoa] Revise loadSimulatedRequest API with final review comments
Brent Fulgham
Reported 2021-03-23 14:27:49 PDT
We've received final internal review on the proposed Cocoa API for loadSimulatedRequest, which suggested two small changes. This patch exposes the final API, and marks the prior version as deprecated. 1. Revise 'with' label to just be 'response'. - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request withResponse:(NSURLResponse *)response responseData:(NSData *)data; Becomes - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request response:(NSURLResponse *)response responseData:(NSData *)data; 2. Revise 'withResponseHTML' to 'responseHTML' - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request withResponseHTMLString:(NSString *)string; Becomes - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request responseHTMLString:(NSString *)string;
Attachments
Patch (8.78 KB, patch)
2021-03-23 16:16 PDT, Brent Fulgham
no flags
Radar WebKit Bug Importer
Comment 1 2021-03-23 15:18:07 PDT
Brent Fulgham
Comment 2 2021-03-23 16:16:10 PDT
Alex Christensen
Comment 3 2021-03-23 16:55:12 PDT
Comment on attachment 424076 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424076&action=review > Source/WebKit/UIProcess/API/Cocoa/WKWebView.h:492 > +- (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request response:(NSURLResponse *)response responseData:(NSData *)data WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); Nobody suggested responseBody instead of responseData? > Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:54 > + [delegate waitForDidFinishNavigation]; This should do more than just wait until navigation finishes. It should verify that the data did load how we think it should.
EWS
Comment 4 2021-03-24 10:03:14 PDT
Committed r274944: <https://commits.webkit.org/r274944> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424076 [details].
Note You need to log in before you can comment on or make changes to this bug.