#include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/test/task_environment.h"
#include "base/threading/simple_thread.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace discardable_memory {
namespace {
const int kInvalidUniqueID = …;
class TestDiscardableSharedMemory : public base::DiscardableSharedMemory { … };
class TestDiscardableSharedMemoryManager
: public DiscardableSharedMemoryManager { … };
class DiscardableSharedMemoryManagerTest : public testing::Test { … };
TEST_F(DiscardableSharedMemoryManagerTest, AllocateForClient) { … }
TEST_F(DiscardableSharedMemoryManagerTest, Purge) { … }
TEST_F(DiscardableSharedMemoryManagerTest, EnforceMemoryPolicy) { … }
TEST_F(DiscardableSharedMemoryManagerTest,
ReduceMemoryAfterSegmentHasBeenDeleted) { … }
TEST_F(DiscardableSharedMemoryManagerTest, OnMemoryPressure) { … }
class DiscardableSharedMemoryManagerScheduleEnforceMemoryPolicyTest
: public testing::Test { … };
class SetMemoryLimitRunner : public base::DelegateSimpleThread::Delegate { … };
TEST_F(DiscardableSharedMemoryManagerScheduleEnforceMemoryPolicyTest,
SetMemoryLimitOnSimpleThread) { … }
}
}