Index: cc/test/test_tile_task_runner.cc |
diff --git a/cc/test/test_tile_task_runner.cc b/cc/test/test_tile_task_runner.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4b5434b28942a0c67a95bef6978aa86c2ab2a2b5 |
--- /dev/null |
+++ b/cc/test/test_tile_task_runner.cc |
@@ -0,0 +1,40 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "cc/test/test_tile_task_runner.h" |
+ |
+#include "base/logging.h" |
+ |
+namespace cc { |
+ |
+void TestTileTaskRunner::ProcessTask(TileTask* task) { |
+ ScheduleTask(task); |
+ RunTask(task); |
+ CompleteTask(task); |
+} |
+ |
+void TestTileTaskRunner::ScheduleTask(TileTask* task) { |
+ DCHECK(task); |
+ task->state().DidSchedule(); |
+} |
+ |
+void TestTileTaskRunner::CancelTask(TileTask* task) { |
+ DCHECK(task); |
+ task->state().DidCancel(); |
+} |
+ |
+void TestTileTaskRunner::RunTask(TileTask* task) { |
+ DCHECK(task); |
+ task->state().DidStart(); |
+ task->RunOnWorkerThread(); |
+ task->state().DidFinish(); |
+} |
+ |
+void TestTileTaskRunner::CompleteTask(TileTask* task) { |
+ DCHECK(task); |
+ DCHECK(task->state().IsFinished() || task->state().IsCanceled()); |
+ task->OnTaskCompleted(); |
+} |
+ |
+} // namespace cc |