Fixes for the failing URLLoaderFactoryImplTest content_unittests with PlzNavigate enabled
The main resource requests which the content_unittests were making using mojo were failing in RDHI because the renderer is not supposed to make main resource requests with PlzNavigate. Worked around this by setting the process type to PROCESS_TYPE_UNKNOWN in ResourceMessageFilter for these unittests and added a check in the related code to only enforce these checks for PROCESS_TYPE_RENDERER. The other change was in the TestURLLoaderClient methods which run the message loop waiting for states like response received, body received etc. For some reason, with PlzNavigate enabled the response for the body arrives immediately following the header response causing the next wait to just block. The fixes were to see if already have a response_body_ in the TestURLLoaderClient::RunUntilResponseBodyArrived method and return immediately and a similar check in TestURLLoaderClient::RunUntilComplete() BUG=439423 Review-Url: https://codereview.chromium.org/2283473002 Cr-Commit-Position: refs/heads/master@{#414640}
Showing
Please register or sign in to comment