chromium/components/metrics/data_use_tracker_unittest.cc

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

#include "components/metrics/data_use_tracker.h"

#include "base/time/time.h"
#include "base/values.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace metrics {

namespace {

const char kTodayStr[] =;
const char kYesterdayStr[] =;
const char kExpiredDateStr1[] =;
const char kExpiredDateStr2[] =;

class TestDataUsePrefService : public TestingPrefServiceSimple {};

class FakeDataUseTracker : public DataUseTracker {};

// Sets up data usage prefs with mock values so that UMA traffic is above the
// allowed ratio.
void SetPrefTestValuesOverRatio(PrefService* local_state) {}

// Sets up data usage prefs with mock values which can be valid.
void SetPrefTestValuesValidRatio(PrefService* local_state) {}

}  // namespace

TEST(DataUseTrackerTest, CheckUpdateUsagePref) {}

TEST(DataUseTrackerTest, CheckRemoveExpiredEntries) {}

TEST(DataUseTrackerTest, CheckComputeTotalDataUse) {}

TEST(DataUseTrackerTest, CheckShouldUploadLogOnCellular) {}

}  // namespace metrics