[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();