1 // Copyright (c) 2012 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.
5 #include "base/test/test_pending_task.h"
9 TestPendingTask::TestPendingTask() : nestability(NESTABLE
) {}
11 TestPendingTask::TestPendingTask(
12 const tracked_objects::Location
& location
,
16 TestNestability nestability
)
21 nestability(nestability
) {}
23 TimeTicks
TestPendingTask::GetTimeToRun() const {
24 return post_time
+ delay
;
27 bool TestPendingTask::ShouldRunBefore(const TestPendingTask
& other
) const {
28 if (nestability
!= other
.nestability
)
29 return (nestability
== NESTABLE
);
30 return GetTimeToRun() < other
.GetTimeToRun();
33 TestPendingTask::~TestPendingTask() {}