chromium/components/system_cpu/cpu_probe_unittest.cc

// Copyright 2021 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/system_cpu/cpu_probe.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/sequence_checker.h"
#include "base/test/bind.h"
#include "base/test/gtest_util.h"
#include "base/test/task_environment.h"
#include "base/thread_annotations.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "components/system_cpu/cpu_probe.h"
#include "components/system_cpu/cpu_sample.h"
#include "components/system_cpu/pressure_test_support.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace system_cpu {

class CpuProbeTest : public testing::Test {};

CpuProbeDeathTest;

TEST_F(CpuProbeTest, RequestSample) {}

TEST_F(CpuProbeTest, RepeatedSamples) {}

TEST_F(CpuProbeTest, DestroyWhileSampling) {}

// TODO(crbug.com/41485857): Fix test flakily timing out and re-enable.
TEST_F(CpuProbeDeathTest, DISABLED_CpuUtilizationTooLarge) {}

// TODO(crbug.com/41485857): Fix test flakily timing out and re-enable.
TEST_F(CpuProbeDeathTest, DISABLED_CpuUtilizationTooSmall) {}

// TODO(crbug.com/41485857): Fix test flakily timing out and re-enable.
TEST_F(CpuProbeDeathTest, DISABLED_RequestSampleWithoutStartSampling) {}

}  // namespace system_cpu