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

Side by Side Diff: base/task_scheduler/task_tracker_unittest.cc

Issue 2162053006: Move EXPECT_DCHECK_DEATH from base/task_scheduler and use it in relevant base/ tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge up to r408965 Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/task_scheduler/task_tracker.h" 5 #include "base/task_scheduler/task_tracker.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/sequence_token.h" 17 #include "base/sequence_token.h"
18 #include "base/sequenced_task_runner.h" 18 #include "base/sequenced_task_runner.h"
19 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
20 #include "base/synchronization/waitable_event.h" 20 #include "base/synchronization/waitable_event.h"
21 #include "base/task_scheduler/scheduler_lock.h" 21 #include "base/task_scheduler/scheduler_lock.h"
22 #include "base/task_scheduler/sequence.h" 22 #include "base/task_scheduler/sequence.h"
23 #include "base/task_scheduler/task.h" 23 #include "base/task_scheduler/task.h"
24 #include "base/task_scheduler/task_traits.h" 24 #include "base/task_scheduler/task_traits.h"
25 #include "base/task_scheduler/test_utils.h" 25 #include "base/test/gtest_util.h"
26 #include "base/test/test_simple_task_runner.h" 26 #include "base/test/test_simple_task_runner.h"
27 #include "base/threading/platform_thread.h" 27 #include "base/threading/platform_thread.h"
28 #include "base/threading/sequenced_task_runner_handle.h" 28 #include "base/threading/sequenced_task_runner_handle.h"
29 #include "base/threading/simple_thread.h" 29 #include "base/threading/simple_thread.h"
30 #include "base/threading/thread_restrictions.h" 30 #include "base/threading/thread_restrictions.h"
31 #include "base/threading/thread_task_runner_handle.h" 31 #include "base/threading/thread_task_runner_handle.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 33
34 namespace base { 34 namespace base {
35 namespace internal { 35 namespace internal {
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 639
640 // Unblock shutdown by running |block_shutdown_task|. 640 // Unblock shutdown by running |block_shutdown_task|.
641 tracker_.RunNextTaskInSequence( 641 tracker_.RunNextTaskInSequence(
642 CreateSequenceWithTask(std::move(block_shutdown_task)).get()); 642 CreateSequenceWithTask(std::move(block_shutdown_task)).get());
643 EXPECT_EQ(kLoadTestNumIterations + 1, NumTasksExecuted()); 643 EXPECT_EQ(kLoadTestNumIterations + 1, NumTasksExecuted());
644 WAIT_FOR_ASYNC_SHUTDOWN_COMPLETED(); 644 WAIT_FOR_ASYNC_SHUTDOWN_COMPLETED();
645 } 645 }
646 646
647 } // namespace internal 647 } // namespace internal
648 } // namespace base 648 } // namespace base
OLDNEW
« no previous file with comments | « base/task_scheduler/scheduler_worker_stack_unittest.cc ('k') | base/task_scheduler/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698