Skip to content
  • jam's avatar
    Fix headless_browsertests failures with PlzNavigate. · 6be7f531
    jam authored
    The fixes are:
    -fire Network.loadingFailed event when a navigation fails. Since there's no ResourceLoader in the renderer for failed navigation requests, we have to fire this from the browser.
    -synchronously wait for confirmation that the renderer enabled network/page modules before navigating pages, otherwise the observers miss some devtools messages flakily. With PlzNavigate enabled, RenderFrameDevToolsAgentHost buffers devtools messages because of speculative RFHs. So when a WebContents is created, we have to wait for the reply for enabling a module which depends on the initial about:blank navigation committing.
    -change HeadlessBrowserTest::WaitForLoad to use content::TestNavigationObserver instead of depending on devtools messages, as those could be missed if they were fired before enabling the network module
    
    BUG=504347
    CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
    
    Review-Url: https://codereview.chromium.org/2720543002
    Cr-Commit-Position: refs/heads/master@{#453374}
    6be7f531