chromium/services/device/geolocation/wifi_polling_policy_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "services/device/geolocation/wifi_polling_policy.h"

#include <memory>

#include "base/memory/raw_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace device {

namespace {

const int kDefaultIntervalMillis =;
const int kNoChangeIntervalMillis =;
const int kTwoNoChangeIntervalMillis =;
const int kNoWifiIntervalMillis =;

}  // namespace

// Main test fixture
class GeolocationWifiPollingPolicyTest : public testing::Test {};

TEST_F(GeolocationWifiPollingPolicyTest, CreateDestroy) {}

// Tests that the InitialInterval is zero when the policy is first created.
TEST_F(GeolocationWifiPollingPolicyTest, InitialIntervalZero) {}

// Tests that the PollingInterval is equal to the default polling interval when
// the policy is first created.
TEST_F(GeolocationWifiPollingPolicyTest, PollingIntervalNonZero) {}

// Tests that the NoWifiInterval is equal to the default no-wifi interval when
// the policy is first created.
TEST_F(GeolocationWifiPollingPolicyTest, NoWifiIntervalNonZero) {}

// Calls UpdatePollingInterval once with unchanged scan results. Verifies that
// the no-change interval is used.
TEST_F(GeolocationWifiPollingPolicyTest, UpdatePollingIntervalOnce) {}

// Calls UpdatePollingInterval twice with unchanged scan results. Verifies that
// the two-no-change interval is used.
TEST_F(GeolocationWifiPollingPolicyTest, UpdatePollingIntervalTwice) {}

// Calls UpdatePollingInterval three times with unchanged scan results. This
// should have the same effect as calling it twice.
TEST_F(GeolocationWifiPollingPolicyTest, UpdatePollingIntervalThrice) {}

// Calls UpdatePollingInterval twice with unchanged scan results and then once
// with differing results. Verifies that the default interval is used.
TEST_F(GeolocationWifiPollingPolicyTest, UpdatePollingIntervalResultsDiffer) {}

TEST_F(GeolocationWifiPollingPolicyTest, ShorterInterval) {}

TEST_F(GeolocationWifiPollingPolicyTest, LongerInterval) {}

}  // namespace device