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

Side by Side Diff: base/task_scheduler/scoped_set_task_priority_for_current_thread_unittest.cc

Issue 2546773002: TaskScheduler: Add internal::GetTaskPriorityForCurrentThread(). (Closed)
Patch Set: rename to scoped_set_task_priority_for_current_thread.h/cc Created 4 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/task_scheduler/scoped_set_task_priority_for_current_thread.h"
6
7 #include "base/task_scheduler/task_traits.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace base {
11 namespace internal {
12
13 TEST(TaskSchedulerScopedSetTaskPriorityForCurrentThreadTest,
14 ScopedSetTaskPriorityForCurrentThread) {
15 EXPECT_EQ(TaskPriority::USER_VISIBLE, GetTaskPriorityForCurrentThread());
16 {
17 ScopedSetTaskPriorityForCurrentThread
18 scoped_set_task_priority_for_current_thread(
19 TaskPriority::USER_BLOCKING);
20 EXPECT_EQ(TaskPriority::USER_BLOCKING, GetTaskPriorityForCurrentThread());
21 }
22 EXPECT_EQ(TaskPriority::USER_VISIBLE, GetTaskPriorityForCurrentThread());
23 }
24
25 } // namespace internal
26 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/scoped_set_task_priority_for_current_thread.cc ('k') | base/task_scheduler/task_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698