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
3 // found in the LICENSE file.
5 #include "components/variations/variations_request_scheduler.h"
8 #include "base/bind_helpers.h"
9 #include "base/message_loop/message_loop.h"
10 #include "testing/gtest/include/gtest/gtest.h"
12 namespace chrome_variations
{
14 TEST(VariationsRequestSchedulerTest
, ScheduleFetchShortly
) {
15 base::MessageLoopForUI message_loop_
;
17 const base::Closure task
= base::Bind(&base::DoNothing
);
18 VariationsRequestScheduler
scheduler(task
);
19 EXPECT_FALSE(scheduler
.one_shot_timer_
.IsRunning());
21 scheduler
.ScheduleFetchShortly();
22 EXPECT_TRUE(scheduler
.one_shot_timer_
.IsRunning());
25 } // namespace chrome_variations