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

Side by Side Diff: chrome/browser/metrics/variations/variations_request_scheduler_unittest.cc

Issue 1180373004: Cleanup: Remove various DoNothing functions and use base::DoNothing(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | net/spdy/spdy_stream_test_util.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/metrics/variations/variations_request_scheduler.h" 5 #include "chrome/browser/metrics/variations/variations_request_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h"
8 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 11
11 namespace chrome_variations { 12 namespace chrome_variations {
12 13
13 namespace {
14
15 void DoNothing() {
16 }
17
18 } // namespace
19
20 TEST(VariationsRequestSchedulerTest, ScheduleFetchShortly) { 14 TEST(VariationsRequestSchedulerTest, ScheduleFetchShortly) {
21 base::MessageLoopForUI message_loop_; 15 base::MessageLoopForUI message_loop_;
22 16
23 const base::Closure task = base::Bind(&DoNothing); 17 const base::Closure task = base::Bind(&base::DoNothing);
24 VariationsRequestScheduler scheduler(task); 18 VariationsRequestScheduler scheduler(task);
25 EXPECT_FALSE(scheduler.one_shot_timer_.IsRunning()); 19 EXPECT_FALSE(scheduler.one_shot_timer_.IsRunning());
26 20
27 scheduler.ScheduleFetchShortly(); 21 scheduler.ScheduleFetchShortly();
28 EXPECT_TRUE(scheduler.one_shot_timer_.IsRunning()); 22 EXPECT_TRUE(scheduler.one_shot_timer_.IsRunning());
29 } 23 }
30 24
31 } // namespace chrome_variations 25 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_stream_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698