1 // Copyright 2014 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 #ifndef CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_
6 #define CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/test/test_simple_task_runner.h"
14 // This runs pending tasks based on task's post_time + delay.
15 // We should not execute a delayed task sooner than some of the queued tasks
16 // which don't have a delay even though it is queued early.
17 class OrderedSimpleTaskRunner
: public base::TestSimpleTaskRunner
{
19 OrderedSimpleTaskRunner();
21 virtual void RunPendingTasks() OVERRIDE
;
24 virtual ~OrderedSimpleTaskRunner();
27 DISALLOW_COPY_AND_ASSIGN(OrderedSimpleTaskRunner
);
32 #endif // CC_TEST_ORDERED_SIMPLE_TASK_RUNNER_H_