commit | b4e97b580657847b818d0b3f3768a69dd0a51a45 | [log] [tgz] |
---|---|---|
author | Alex Moshchuk <alexmos@chromium.org> | Fri Apr 07 17:21:06 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Apr 07 17:21:06 2023 |
tree | d8ba07179aacddc8aff1ef32e994f429cbff4f28 | |
parent | ec682d395197be41fbc4124e76a01d4309bc97f2 [diff] |
Fix test setup for two unit tests that manipulate TestWebContents. Currently, tests in RenderWidgetHostViewChildFrameTest and RenderWidgetHostViewChildFrameTest have a teardown issue where one of the two RenderProcessHosts they create is not removed from ChildProcessSecurityPolicy's security_state_ (which maintains a global list of all renderer process IDs). More precisely, this is the case for the web_contents_'s main frame process. I think this is because this TestWebContents is manually created/deleted, which omits some of the required setup/teardown we usually do in unit tests (via RenderViewHostImplTestHarness, RenderViewHostTestEnabler, TestWebContentsFactory, etc) and/or doesn't wait for the process to finish tearing down (which could be async). Convert both of these tests to use RenderViewHostImplTestHarness instead, which also simplifies the tests' setup, as it already provides a WebContents and BrowserContext that are properly initialized and destroyed. This solves the cleanup problem. This is necessary to unblock https://chromium-review.googlesource.com/c/chromium/src/+/4396425 which is otherwise flaky. Bug: 764958, 1426239 Change-Id: Ieb3d855c654eccf87a4e7c0c6c5b266cb7bec5d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4404942 Commit-Queue: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Ćukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/main@{#1127635}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.