Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: components/scheduler/base/task_queue_manager_unittest.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/scheduler/base/task_queue_manager_perftest.cc ('k') | components/scheduler/base/task_queue_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698