#include "services/device/compute_pressure/pressure_manager_impl.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/barrier_closure.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ref.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/test_future.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "base/unguessable_token.h"
#include "build/build_config.h"
#include "components/system_cpu/pressure_test_support.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/system/functions.h"
#include "services/device/compute_pressure/cpu_probe_manager.h"
#include "services/device/compute_pressure/probes_manager.h"
#include "services/device/device_service_test_base.h"
#include "services/device/public/mojom/pressure_manager.mojom-shared.h"
#include "services/device/public/mojom/pressure_manager.mojom.h"
#include "services/device/public/mojom/pressure_update.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
namespace {
class FakePressureClient : public mojom::PressureClient { … };
}
class PressureManagerImplTest : public DeviceServiceTestBase { … };
TEST_F(PressureManagerImplTest, OneClient) { … }
TEST_F(PressureManagerImplTest, ThreeClients) { … }
TEST_F(PressureManagerImplTest, AddClientNoProbe) { … }
TEST_F(PressureManagerImplTest, AddClientInvalidToken) { … }
TEST_F(PressureManagerImplTest, AddClientExistingToken) { … }
TEST_F(PressureManagerImplTest, OneClientOneVirtual) { … }
TEST_F(PressureManagerImplTest, UpdateVirtualClientWithNoVirtualClient) { … }
TEST_F(PressureManagerImplTest, OneVirtualClient) { … }
TEST_F(PressureManagerImplTest, ContinuousUpdateReports) { … }
TEST_F(PressureManagerImplTest, SameStateUpdatesAreNotDropped) { … }
TEST_F(PressureManagerImplTest, VirtualPressureSourceNotAvailable) { … }
}