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

Unified Diff: base/task_scheduler/task_tracker_unittest.cc

Issue 2601623002: TaskTraits: Rename WithSyncPrimitives() to WithBaseSyncPrimitives(). (Closed)
Patch Set: CR gab #6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/task_scheduler/task_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_tracker_unittest.cc
diff --git a/base/task_scheduler/task_tracker_unittest.cc b/base/task_scheduler/task_tracker_unittest.cc
index c8dbbfdaa13d0aa8025e02ab7ffb5b76a554292a..161aabb0d7c4c4745f8e9f7674fca7ad1ee60fe4 100644
--- a/base/task_scheduler/task_tracker_unittest.cc
+++ b/base/task_scheduler/task_tracker_unittest.cc
@@ -264,7 +264,7 @@ TEST_P(TaskSchedulerTaskTrackerTest, WillPostAndRunLongTaskBeforeShutdown) {
WaitableEvent::InitialState::NOT_SIGNALED);
auto blocked_task = base::MakeUnique<Task>(
FROM_HERE, Bind(&WaitableEvent::Wait, Unretained(&event)),
- TaskTraits().WithSyncPrimitives().WithShutdownBehavior(GetParam()),
+ TaskTraits().WithBaseSyncPrimitives().WithShutdownBehavior(GetParam()),
TimeDelta());
// Inform |task_tracker_| that |blocked_task| will be posted.
@@ -844,7 +844,7 @@ class WaitAllowedTestThread : public SimpleThread {
TaskTracker tracker;
// Waiting is allowed by default. Expect TaskTracker to disallow it before
- // running a task without the WithSyncPrimitives() trait.
+ // running a task without the WithBaseSyncPrimitives() trait.
ThreadRestrictions::AssertWaitAllowed();
auto task_without_sync_primitives = MakeUnique<Task>(
FROM_HERE, Bind([]() {
@@ -856,14 +856,14 @@ class WaitAllowedTestThread : public SimpleThread {
SequenceToken::Create());
// Disallow waiting. Expect TaskTracker to allow it before running a task
- // with the WithSyncPrimitives() trait.
+ // with the WithBaseSyncPrimitives() trait.
ThreadRestrictions::DisallowWaiting();
auto task_with_sync_primitives =
MakeUnique<Task>(FROM_HERE, Bind([]() {
// Shouldn't fail.
ThreadRestrictions::AssertWaitAllowed();
}),
- TaskTraits().WithSyncPrimitives(), TimeDelta());
+ TaskTraits().WithBaseSyncPrimitives(), TimeDelta());
EXPECT_TRUE(tracker.WillPostTask(task_with_sync_primitives.get()));
tracker.RunTask(std::move(task_with_sync_primitives),
SequenceToken::Create());
@@ -874,7 +874,8 @@ class WaitAllowedTestThread : public SimpleThread {
} // namespace
-// Verify that AssertIOAllowed() succeeds only for a WithSyncPrimitives() task.
+// Verify that AssertIOAllowed() succeeds only for a WithBaseSyncPrimitives()
+// task.
TEST(TaskSchedulerTaskTrackerWaitAllowedTest, WaitAllowed) {
// Run the test on the separate thread since it is not possible to reset the
// "wait allowed" bit of a thread without being a friend of
« no previous file with comments | « base/task_scheduler/task_tracker.cc ('k') | base/task_scheduler/task_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698