Avoid leaking SystemNetworkContextManager between PlatformUtilTest tests.
On ChromeOS, PlatformUtilTest tests indirectly result in the global SystemNetworkContextManager instance being set, initialized with the local state PrefService owned by the TestProfileManager managed by BrowserWithTestWindowTest. When the second test in the fixture runs, the retained PrefService pointer is dangling, resulting in a use-after-free. Add a conditional SystemNetworkContextManager cleanup to BrowserWithTestWindowTest::TearDown() to avoid leaking it between tests. Re-enable PlatformUtilTest.OpenFolder now that it passes reliably. Bug: 1004639 Change-Id: I03c9d06cb98c258a3db8741e6f2576f887cdb705 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821697 Commit-Queue: Noel Gordon <noel@chromium.org> Reviewed-by:John Abd-El-Malek <jam@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#699473}
Showing
Please register or sign in to comment