commit | 2b82f40044c9afc41f9b9b9e78c5369052f554a8 | [log] [tgz] |
---|---|---|
author | François Doray <[email protected]> | Mon Nov 04 21:16:48 2019 |
committer | Commit Bot <[email protected]> | Mon Nov 04 21:16:48 2019 |
tree | 8d4ca696cf782bfccba82953f61a207faaec50f0 | |
parent | a80854fdd5349c1456d54899dce265e0b1e3a11e [diff] [blame] |
[base] Ensure that tests don't change the thread priority (reland #3). This is a reland of https://crrev.com/c/chromium/src/+/1865405 The difference is that the check is not enabled on Android, due to test failures. It is better to land this now to avoid regressions on other platforms while Android failure is investigated. Diff: https://crrev.com/c/chromium/src/+/1894158/1..2/base/test/test_suite.cc This CL verifies that the thread priority is normal when a test process is launched and before/after each test. The goal is to avoid having tests that assume they run at normal priority be disabled because of other misbehaving tests (e.g. https://crbug.com/931706). [email protected],[email protected],[email protected],[email protected],[email protected] Bug: 931706 Change-Id: I2db19e011ad1c408bb112b35b453b081f6888739 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894158 Commit-Queue: François Doray <[email protected]> Reviewed-by: Scott Violet <[email protected]> Reviewed-by: François Doray <[email protected]> Cr-Commit-Position: refs/heads/master@{#712259}
diff --git a/content/test/content_test_launcher.cc b/content/test/content_test_launcher.cc index 37aec6f6..7fd5bcb2 100644 --- a/content/test/content_test_launcher.cc +++ b/content/test/content_test_launcher.cc
@@ -39,9 +39,10 @@ protected: void Initialize() override { - // Browser tests are expected not to tear-down various globals. (Must run - // before the base class is initialized.) + // Browser tests are expected not to tear-down various globals and may + // complete with the thread priority being above NORMAL. base::TestSuite::DisableCheckForLeakedGlobals(); + base::TestSuite::DisableCheckForThreadPriorityAtTestEnd(); ContentTestSuiteBase::Initialize();