chromium/content/browser/memory/swap_metrics_driver_impl_unittest.cc

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

#include "content/browser/memory/swap_metrics_driver_impl.h"

#include <memory>

#include "base/memory/ptr_util.h"
#include "base/test/task_environment.h"
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace content {

namespace {

// A SwapMetricsDriver that mocks what a platform-dependent driver does, but
// with control over when it fails so we can test error conditions.
class MockSwapMetricsDriver : public SwapMetricsDriverImpl {};

// A SwapMetricsDriver::Delegate that counts the number of updates for each
// metric.
class SwapMetricsDelegateCounter : public SwapMetricsDriver::Delegate {};

// The time delta between updates must non-zero for the delegate callbacks to be
// invoked.
constexpr base::TimeDelta kUpdateDelay =;

}  // namespace

class TestSwapMetricsDriver : public testing::Test {};

TEST_F(TestSwapMetricsDriver, ExpectedMetricCounts) {}

TEST_F(TestSwapMetricsDriver, TimerStartSuccess) {}

TEST_F(TestSwapMetricsDriver, TimerStartFail) {}

TEST_F(TestSwapMetricsDriver, UpdateMetricsFail) {}

}  // namespace content