Bug 227599

Summary: loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, cdumez, commit-queue, ews-watchlist, japhet, ryanhaddad, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 227628    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Alex Christensen 2021-07-01 15:22:55 PDT
loadSimulatedRequest: should do same delegate callbacks as loadHTMLString and loadData
Comment 1 Alex Christensen 2021-07-01 15:23:27 PDT
Created attachment 432731 [details]
Patch
Comment 2 Chris Dumez 2021-07-01 15:26:48 PDT
Comment on attachment 432731 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=432731&action=review

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewLoadAPIs.mm:97
> +        EXPECT_EQ(vector.size(), 4u);

ASSERT_EQ() as we'll crash otherwise.
Comment 3 Alex Christensen 2021-07-01 15:45:44 PDT
Created attachment 432737 [details]
Patch
Comment 4 Wenson Hsieh 2021-07-01 16:16:30 PDT
rdar://78578639
Comment 5 EWS 2021-07-01 18:45:38 PDT
Committed r279494 (239346@main): <https://commits.webkit.org/239346@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432737 [details].
Comment 7 WebKit Commit Bot 2021-07-02 08:03:07 PDT
Re-opened since this is blocked by bug 227628
Comment 8 Alex Christensen 2021-07-02 21:45:05 PDT
Created attachment 432841 [details]
Patch
Comment 9 Alex Christensen 2021-07-02 22:26:30 PDT
Comment on attachment 432841 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=432841&action=review

> Source/WebKit/ChangeLog:9
> +

I also wanted to add this:
Before this change we set SubstituteData.failingURL, which in FrameLoader::PolicyChecker::checkNavigationPolicy makes it behave more like _loadAlternateHTMLString which doesn't call decidePolicyForNavigationAction and does add a back/forward entry.  We want it to behave more like loadHTMLString, which does call decidePolicyForNavigationAction and doesn't add a back/forward entry.  Except we do want it to add a back/forward entry.  This patch is to accomplish that.
Comment 10 Alex Christensen 2021-07-06 10:34:15 PDT
r279595