OLD | NEW |
(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 |
OLD | NEW |