• Danyao Wang's avatar
    Reland "[Nav Experiment] Fix form repost detection in WKBasedNavigationManager." · c1fa0052
    Danyao Wang authored
    This is a reland of 091e44cb.
    
    It fixes the regression in
    WebUITestCase/testChromeURLBackAndForwardAndReloadNavigation. WebUI
    needs special handling in reload because calling [WKWebView -reload]
    simply reloads WKWebView.URL (which is an app-specific URL in this case)
    and results in a provisional load failure.
    
    The other suspected test failure
    (ContextMenuJsTest.LinkOfTextWithCalloutNone) is not caused by the
    original CL. It seems to be flaky. It failed again after the revert:
    https://luci-milo.appspot.com/buildbot/internal.bling.main/iphone11-device-x64/2532
    and it failed before the original CL was checked in:
    https://luci-milo.appspot.com/buildbot/internal.bling.main/iphone11-device-x64/2504
    
    Original change's description:
    > [Nav Experiment] Fix form repost detection in WKBasedNavigationManager.
    >
    > This CL moves form repost detection for WKBasedNavigationManager to
    > in |webView:decidePolicyForNavigationAction|, where WKWebView gives a
    > clear signal about form reposting (WKNavigationTypeFormResubmitted).
    > This allows simplifying reload for WKBasedNavigationManager to directly
    > delegating to [WKWebView reload].
    >
    > FormsTestCase now pass with WKBasedNavigationManager.
    >
    > Bug: 807428,705020
    > Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    > Change-Id: Ia35978c42b21405a3749d1764a0485cde9c805d2
    > Reviewed-on: https://chromium-review.googlesource.com/894892
    > Commit-Queue: Danyao Wang <danyao@chromium.org>
    > Reviewed-by: Eugene But <eugenebut@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#533692}t
    
    Bug: 807428
    Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    Change-Id: If0bb1c907472ec402931c69f347c9259907c4f28
    Reviewed-on: https://chromium-review.googlesource.com/899916Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Commit-Queue: Danyao Wang <danyao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#534163}
    c1fa0052
crw_web_controller.mm 218 KB