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

Side by Side Diff: base/task/cancelable_task_tracker_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
« no previous file with comments | « base/system_monitor/system_monitor_unittest.cc ('k') | base/task_runner_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/task/cancelable_task_tracker.h" 5 #include "base/task/cancelable_task_tracker.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/run_loop.h" 16 #include "base/run_loop.h"
17 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
18 #include "base/test/test_simple_task_runner.h" 18 #include "base/test/test_simple_task_runner.h"
19 #include "base/threading/thread.h" 19 #include "base/threading/thread.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/googletest/include/gtest/gtest.h"
21 21
22 namespace base { 22 namespace base {
23 23
24 namespace { 24 namespace {
25 25
26 class CancelableTaskTrackerTest : public testing::Test { 26 class CancelableTaskTrackerTest : public testing::Test {
27 protected: 27 protected:
28 ~CancelableTaskTrackerTest() override { RunCurrentLoopUntilIdle(); } 28 ~CancelableTaskTrackerTest() override { RunCurrentLoopUntilIdle(); }
29 29
30 void RunCurrentLoopUntilIdle() { 30 void RunCurrentLoopUntilIdle() {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 bad_thread.task_runner()->PostTask( 416 bad_thread.task_runner()->PostTask(
417 FROM_HERE, 417 FROM_HERE,
418 Bind(&MaybeRunDeadlyTaskTrackerMemberFunction, Unretained(&task_tracker_), 418 Bind(&MaybeRunDeadlyTaskTrackerMemberFunction, Unretained(&task_tracker_),
419 Bind(&CancelableTaskTracker::TryCancelAll))); 419 Bind(&CancelableTaskTracker::TryCancelAll)));
420 420
421 test_task_runner->RunUntilIdle(); 421 test_task_runner->RunUntilIdle();
422 } 422 }
423 423
424 } // namespace base 424 } // namespace base
OLDNEW
« no previous file with comments | « base/system_monitor/system_monitor_unittest.cc ('k') | base/task_runner_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698