• Lukasz Anforowicz's avatar
    After remote subframe stops loading, check the parent. · e7365233
    Lukasz Anforowicz authored
    This CL fixes a problem where a GuestView that stops loading (e.g. a
    MimeHandlerView for a PDF) would not trigger a re-checking whether a
    parent frame can also report that it stopped loading.  The CL fixes this
    by adding a |parent->CheckCompleted()| call to
    WebRemoteFrameImpl::DidStopLoading.
    
    In a regular-OOPIF case, the check in the parent would be triggered by:
    1. OOPIF process: FrameLoader::DidFinishNavigation
                      -> parent->CheckCompleted()
                      -> RemoteFrame::CheckCompleted()
                      -> ...
                      -> RenderFrameProxy::CheckCompleted()
                      -> send FrameHostMsg_CheckCompleted
    2. Parent process: receive FrameMsg_CheckCompleted
                       -> LocalFrame::CheckCompleted()
    The flow above is not happening for GuestView, because the main frame
    inside the GuestView doesn't know it has a parent.
    
    FWIW, the DidStopLoading issue is (a bit remotely) similar to the
    old https://crbug.com/779433.
    
    This CL re-enables a portion of the
    SavePageOriginalVsSavedComparisonTest.ObjectElementsViaHttp test,
    because after this CL, the test no longer hangs when waiting for the
    test page to stop loading.  The remainder of the test will be re-enabled
    after fixing find-in-page issues that are tracked in
    https://crbug.com/965254.
    
    Bug: 964364
    Change-Id: Iee165a88cdfb94b3169919393c563b483c145cda
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621486
    Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#665221}
    e7365233
pdf_extension_test.cc 86.6 KB