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/base/task_queue_manager.h" | 5 #include "components/scheduler/base/task_queue_manager.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/location.h" | 9 #include "base/location.h" |
8 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
9 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
10 #include "base/test/simple_test_tick_clock.h" | 12 #include "base/test/simple_test_tick_clock.h" |
11 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
12 #include "cc/test/ordered_simple_task_runner.h" | 14 #include "cc/test/ordered_simple_task_runner.h" |
13 #include "components/scheduler/base/real_time_domain.h" | 15 #include "components/scheduler/base/real_time_domain.h" |
14 #include "components/scheduler/base/task_queue_impl.h" | 16 #include "components/scheduler/base/task_queue_impl.h" |
15 #include "components/scheduler/base/task_queue_manager_delegate_for_test.h" | 17 #include "components/scheduler/base/task_queue_manager_delegate_for_test.h" |
16 #include "components/scheduler/base/task_queue_selector.h" | 18 #include "components/scheduler/base/task_queue_selector.h" |
(...skipping 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1696 double ratio = static_cast<double>(linear_delayed_task.count()) / | 1698 double ratio = static_cast<double>(linear_delayed_task.count()) / |
1697 static_cast<double>(quadratic_immediate_task.count()); | 1699 static_cast<double>(quadratic_immediate_task.count()); |
1698 | 1700 |
1699 // This is by design, we want to enforce a strict ordering in task execution | 1701 // This is by design, we want to enforce a strict ordering in task execution |
1700 // where by delayed tasks can not skip ahead of non-delayed work. | 1702 // where by delayed tasks can not skip ahead of non-delayed work. |
1701 EXPECT_GT(ratio, 0.0); | 1703 EXPECT_GT(ratio, 0.0); |
1702 EXPECT_LT(ratio, 0.1); | 1704 EXPECT_LT(ratio, 0.1); |
1703 } | 1705 } |
1704 | 1706 |
1705 } // namespace scheduler | 1707 } // namespace scheduler |
OLD | NEW |