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