Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: base/threading/platform_thread_unittest.cc

Issue 1660273004: base: Set initial thread priority in ThreadFunc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/threading/platform_thread_unittest.cc
diff --git a/base/threading/platform_thread_unittest.cc b/base/threading/platform_thread_unittest.cc
index 52f8d1ba6f31c5158fe6b49e2003c90a844da8f3..8085ce574eb8719d40f0015920d7a267b15b7de0 100644
--- a/base/threading/platform_thread_unittest.cc
+++ b/base/threading/platform_thread_unittest.cc
@@ -262,6 +262,12 @@ TEST(PlatformThreadTest, MAYBE_ThreadPriorityCurrentThread) {
ThreadPriorityTestThread thread;
PlatformThreadHandle handle;
+ if (IsBumpingPriorityAllowed()) {
+ // Bump the priority in order to verify that new threads are started with
+ // normal priority.
+ PlatformThread::SetCurrentThreadPriority(ThreadPriority::DISPLAY);
+ }
+
ASSERT_FALSE(thread.IsRunning());
ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle));
thread.WaitForTerminationReady();
« base/threading/platform_thread_android.cc ('K') | « base/threading/platform_thread_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698