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;
<rdar://problem/75757727>
Created attachment 424076 [details] Patch
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.
Committed r274944: <https://commits.webkit.org/r274944> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424076 [details].