• Hitoshi Yoshida's avatar
    BFcache: Call OnReactivated in ReadyToCommitNavigation · 7ed98321
    Hitoshi Yoshida authored
    In web tests, TestRunner checks if a test can finish successfully
    using the main window's main frame, and it is searched from a list
    of main frames.
    Internally, JavaScript code which tries to finish tests is invoked
    from CommitNavigation. But when we use back/forward navigation with
    BFcache, we update the list of main frames through OnFrameReactivated
    in OnFinishNavigation, that is called after CommitNavigation.
    
    This order makes frames' state inconsistent and tests fail with
    timeout.
    
    This CL moves the call of OnFrameReactivated into
    ReadyToCommitNavigation, which is called before CommitNavigation,
    and makes frames' state in the renderer consistent.
    
    
    Bug: 1150297
    Cq-Include-Trybots: luci.chromium.try:linux-bfcache-rel
    Change-Id: Ib87a2d1c604e0013d3d93d5d679583e196d44eb9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2581621
    Commit-Queue: Hitoshi Yoshida <peria@chromium.org>
    Auto-Submit: Hitoshi Yoshida <peria@chromium.org>
    Reviewed-by: default avatarRakina Zata Amni <rakina@chromium.org>
    Reviewed-by: default avatarFergal Daly <fergal@chromium.org>
    Reviewed-by: default avatardanakj <danakj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#844463}
    7ed98321
web_test_control_host.cc 73.3 KB