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 "platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" | 5 #include "platform/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/test/simple_test_tick_clock.h" | 14 #include "base/test/simple_test_tick_clock.h" |
| 15 #include "platform/WebTaskRunner.h" |
15 #include "platform/scheduler/base/test_time_source.h" | 16 #include "platform/scheduler/base/test_time_source.h" |
16 #include "platform/scheduler/child/scheduler_tqm_delegate_impl.h" | 17 #include "platform/scheduler/child/scheduler_tqm_delegate_impl.h" |
17 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" | 18 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" |
| 19 #include "public/platform/WebTraceLocation.h" |
18 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "platform/WebTaskRunner.h" | |
21 #include "public/platform/WebTraceLocation.h" | |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 namespace scheduler { | 24 namespace scheduler { |
25 namespace { | 25 namespace { |
26 | 26 |
27 const int kWorkBatchSize = 2; | 27 const int kWorkBatchSize = 2; |
28 | 28 |
29 class MockTask { | 29 class MockTask { |
30 public: | 30 public: |
31 MOCK_METHOD0(run, void()); | 31 MOCK_METHOD0(run, void()); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 message_loop_.task_runner()->PostTask( | 198 message_loop_.task_runner()->PostTask( |
199 FROM_HERE, base::Bind(&EnterRunLoop, base::Unretained(&message_loop_), | 199 FROM_HERE, base::Bind(&EnterRunLoop, base::Unretained(&message_loop_), |
200 base::Unretained(thread_.get()))); | 200 base::Unretained(thread_.get()))); |
201 base::RunLoop().RunUntilIdle(); | 201 base::RunLoop().RunUntilIdle(); |
202 thread_->removeTaskObserver(&observer); | 202 thread_->removeTaskObserver(&observer); |
203 } | 203 } |
204 | 204 |
205 } // namespace scheduler | 205 } // namespace scheduler |
206 } // namespace blink | 206 } // namespace blink |
OLD | NEW |