| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "components/scheduler/renderer/renderer_scheduler_impl.h" | 5 #include "components/scheduler/renderer/renderer_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/test/simple_test_tick_clock.h" | 8 #include "base/test/simple_test_tick_clock.h" |
| 9 #include "cc/output/begin_frame_args.h" | 9 #include "cc/output/begin_frame_args.h" |
| 10 #include "cc/test/ordered_simple_task_runner.h" | 10 #include "cc/test/ordered_simple_task_runner.h" |
| 11 #include "components/scheduler/base/test_time_source.h" |
| 11 #include "components/scheduler/child/scheduler_task_runner_delegate_for_test.h" | 12 #include "components/scheduler/child/scheduler_task_runner_delegate_for_test.h" |
| 12 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h" | 13 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h" |
| 13 #include "components/scheduler/child/test_time_source.h" | |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace scheduler { | 17 namespace scheduler { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 class FakeInputEvent : public blink::WebInputEvent { | 20 class FakeInputEvent : public blink::WebInputEvent { |
| 21 public: | 21 public: |
| 22 explicit FakeInputEvent(blink::WebInputEvent::Type event_type) | 22 explicit FakeInputEvent(blink::WebInputEvent::Type event_type) |
| 23 : WebInputEvent(sizeof(FakeInputEvent)) { | 23 : WebInputEvent(sizeof(FakeInputEvent)) { |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 EXPECT_EQ(RendererScheduler::UseCase::NONE, CurrentUseCase()); | 2095 EXPECT_EQ(RendererScheduler::UseCase::NONE, CurrentUseCase()); |
| 2096 EXPECT_TRUE(HaveSeenABeginMainframe()); | 2096 EXPECT_TRUE(HaveSeenABeginMainframe()); |
| 2097 EXPECT_TRUE(LoadingTasksSeemExpensive()); | 2097 EXPECT_TRUE(LoadingTasksSeemExpensive()); |
| 2098 EXPECT_FALSE(TimerTasksSeemExpensive()); | 2098 EXPECT_FALSE(TimerTasksSeemExpensive()); |
| 2099 EXPECT_TRUE(TouchStartExpectedSoon()); | 2099 EXPECT_TRUE(TouchStartExpectedSoon()); |
| 2100 EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1"))); | 2100 EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1"))); |
| 2101 } | 2101 } |
| 2102 | 2102 |
| 2103 | 2103 |
| 2104 } // namespace scheduler | 2104 } // namespace scheduler |
| OLD | NEW |