OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include "base/memory/scoped_ptr.h" |
5 #include "base/test/simple_test_tick_clock.h" | 6 #include "base/test/simple_test_tick_clock.h" |
6 #include "components/scheduler/renderer/deadline_task_runner.h" | 7 #include "components/scheduler/renderer/deadline_task_runner.h" |
7 | 8 |
8 #include "cc/test/ordered_simple_task_runner.h" | 9 #include "cc/test/ordered_simple_task_runner.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
11 | 12 |
12 namespace scheduler { | 13 namespace scheduler { |
13 | 14 |
14 class DeadlineTaskRunnerTest : public testing::Test { | 15 class DeadlineTaskRunnerTest : public testing::Test { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 FROM_HERE, base::TimeDelta::FromMilliseconds(10), clock_->NowTicks()); | 91 FROM_HERE, base::TimeDelta::FromMilliseconds(10), clock_->NowTicks()); |
91 | 92 |
92 // Deleting the pending task should cancel it. | 93 // Deleting the pending task should cancel it. |
93 deadline_task_runner_.reset(nullptr); | 94 deadline_task_runner_.reset(nullptr); |
94 RunUntilIdle(); | 95 RunUntilIdle(); |
95 | 96 |
96 EXPECT_TRUE(run_times_.empty()); | 97 EXPECT_TRUE(run_times_.empty()); |
97 }; | 98 }; |
98 | 99 |
99 } // namespace scheduler | 100 } // namespace scheduler |
OLD | NEW |