• arthursonzogni's avatar
    Make DomSerializerTests not commit unexpected navigations. · 16fae7ca
    arthursonzogni authored
    The DomSerializerTest are executing browser-side and renderer-side code
    in the same process. This was written 10 years ago. The renderer is no
    more expected to load new documents without requesting navigations from
    the browser process.
    
    This patch updates the DomSerializerTest.
    Now the browser process is free to kill more renderer when they try to
    commit unexpected navigation.
    
    This patch looks big, but it isn't. This patch consists of:
    
    1. Update LoadContent to use regular navigations. It is now called from
       the browser process instead of the renderer.
    2. For every test:
          Replace the callback (executed by the renderer process) by a
          lambda expression. Split the lambda around every call to
          LoadContent.  It is now executed from the browser process.
    
    3. Update GetRenderView(). The navigation can now happens in a different
       RenderView[Host], this wasn't the case previously. The value returned
       can now change.
    
    Bug: 1133115
    Change-Id: I683149fbe353cf19fe1db96cda803eab079d8f96
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435350Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#813648}
    16fae7ca
render_frame_host_impl.cc 395 KB