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

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

Issue 2546773002: TaskScheduler: Add internal::GetTaskPriorityForCurrentThread(). (Closed)
Patch Set: self-review 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/task_traits_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(TaskSchedulerTaskTraitsForCurrentThreadTest, TaskTraitsForCurrentThread) {
14 EXPECT_FALSE(GetTaskTraitsForCurrentThread());
15 {
16 const TaskTraits traits;
17 ScopedSetTaskTraitsForCurrentThread
18 scoped_set_task_traits_for_current_thread(&traits);
19 EXPECT_EQ(&traits, GetTaskTraitsForCurrentThread());
20 }
21 EXPECT_FALSE(GetTaskTraitsForCurrentThread());
22 }
23
24 } // namespace internal
25 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698