OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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/threading/simple_thread.h" |
| 6 #include "cc/raster/single_thread_task_graph_runner.h" |
| 7 #include "cc/test/task_graph_runner_test_template.h" |
| 8 |
| 9 namespace cc { |
| 10 namespace { |
| 11 |
| 12 class SingleThreadTaskGraphRunnerTestDelegate { |
| 13 public: |
| 14 SingleThreadTaskGraphRunnerTestDelegate() {} |
| 15 |
| 16 void StartTaskGraphRunner() { |
| 17 single_thread_task_graph_runner_.Start( |
| 18 "SingleThreadTaskGraphRunnerTestDelegate", |
| 19 base::SimpleThread::Options()); |
| 20 } |
| 21 |
| 22 TaskGraphRunner* GetTaskGraphRunner() { |
| 23 return &single_thread_task_graph_runner_; |
| 24 } |
| 25 |
| 26 void StopTaskGraphRunner() {} |
| 27 |
| 28 ~SingleThreadTaskGraphRunnerTestDelegate() { |
| 29 single_thread_task_graph_runner_.Shutdown(); |
| 30 } |
| 31 |
| 32 private: |
| 33 SingleThreadTaskGraphRunner single_thread_task_graph_runner_; |
| 34 }; |
| 35 |
| 36 INSTANTIATE_TYPED_TEST_CASE_P(SingleThreadTaskGraphRunner, |
| 37 TaskGraphRunnerTest, |
| 38 SingleThreadTaskGraphRunnerTestDelegate); |
| 39 INSTANTIATE_TYPED_TEST_CASE_P(SingleThreadTaskGraphRunner, |
| 40 SingleThreadTaskGraphRunnerTest, |
| 41 SingleThreadTaskGraphRunnerTestDelegate); |
| 42 |
| 43 } // namespace |
| 44 } // namespace cc |
OLD | NEW |