blob: f751e793044d0ae379f4bb2791c6808c0e68cf2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/variations/variations_request_scheduler.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/test/scoped_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace variations {
TEST(VariationsRequestSchedulerTest, ScheduleFetchShortly) {
base::test::ScopedTaskEnvironment task_environment;
const base::Closure task = base::DoNothing();
VariationsRequestScheduler scheduler(task);
EXPECT_FALSE(scheduler.one_shot_timer_.IsRunning());
scheduler.ScheduleFetchShortly();
EXPECT_TRUE(scheduler.one_shot_timer_.IsRunning());
}
} // namespace variations
|