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

Side by Side Diff: base/threading/sequenced_task_runner_handle_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/sequence_checker_impl.h" 12 #include "base/sequence_checker_impl.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
15 #include "base/test/sequenced_worker_pool_owner.h" 15 #include "base/test/sequenced_worker_pool_owner.h"
16 #include "base/threading/sequenced_task_runner_handle.h" 16 #include "base/threading/sequenced_task_runner_handle.h"
17 #include "base/threading/sequenced_worker_pool.h" 17 #include "base/threading/sequenced_worker_pool.h"
18 #include "base/threading/simple_thread.h" 18 #include "base/threading/simple_thread.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/googletest/include/gtest/gtest.h"
20 20
21 namespace base { 21 namespace base {
22 namespace { 22 namespace {
23 23
24 class SequencedTaskRunnerHandleTest : public ::testing::Test { 24 class SequencedTaskRunnerHandleTest : public ::testing::Test {
25 protected: 25 protected:
26 static void GetTaskRunner(const Closure& callback) { 26 static void GetTaskRunner(const Closure& callback) {
27 // Use SequenceCheckerImpl to make sure it's not a no-op in Release builds. 27 // Use SequenceCheckerImpl to make sure it's not a no-op in Release builds.
28 scoped_ptr<SequenceCheckerImpl> sequence_checker(new SequenceCheckerImpl); 28 scoped_ptr<SequenceCheckerImpl> sequence_checker(new SequenceCheckerImpl);
29 ASSERT_TRUE(SequencedTaskRunnerHandle::IsSet()); 29 ASSERT_TRUE(SequencedTaskRunnerHandle::IsSet());
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 TEST_F(SequencedTaskRunnerHandleTest, FromSimpleThread) { 77 TEST_F(SequencedTaskRunnerHandleTest, FromSimpleThread) {
78 ThreadRunner thread_runner; 78 ThreadRunner thread_runner;
79 DelegateSimpleThread thread(&thread_runner, "Background thread"); 79 DelegateSimpleThread thread(&thread_runner, "Background thread");
80 thread.Start(); 80 thread.Start();
81 thread.Join(); 81 thread.Join();
82 } 82 }
83 83
84 } // namespace 84 } // namespace
85 } // namespace base 85 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/platform_thread_unittest.cc ('k') | base/threading/sequenced_worker_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698