#include "chrome/browser/dbus_memory_pressure_evaluator_linux.h"
#include <memory>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/memory_pressure_monitor.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_object_proxy.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Return;
namespace {
class MockMemoryPressureVoter : public memory_pressure::MemoryPressureVoter { … };
}
class DbusMemoryPressureEvaluatorLinuxTest : public testing::Test { … };
const char* const DbusMemoryPressureEvaluatorLinuxTest::kLmmService = …;
const char* const DbusMemoryPressureEvaluatorLinuxTest::kLmmInterface = …;
const char* const DbusMemoryPressureEvaluatorLinuxTest::kXdgPortalService = …;
const char* const
DbusMemoryPressureEvaluatorLinuxTest::kXdgPortalMemoryMonitorInterface = …;
TEST_F(DbusMemoryPressureEvaluatorLinuxTest, Basic) { … }
TEST_F(DbusMemoryPressureEvaluatorLinuxTest, PeriodicReset) { … }
TEST_F(DbusMemoryPressureEvaluatorLinuxTest, PrefersConnectingToLmm) { … }
TEST_F(DbusMemoryPressureEvaluatorLinuxTest, FallsBackToPortal) { … }