chromium/third_party/blink/renderer/platform/scheduler/main_thread/memory_purge_manager_unittest.cc

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

#include "third_party/blink/renderer/platform/scheduler/main_thread/memory_purge_manager.h"

#include "base/memory/memory_pressure_listener.h"
#include "base/test/task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"

namespace blink {

namespace {

class MemoryPurgeManagerTest : public testing::Test {};

// Verify that OnPageFrozen() triggers a memory pressure notification in a
// backgrounded renderer.
TEST_F(MemoryPurgeManagerTest, PageFrozenInBackgroundedRenderer) {}

// Verify that OnPageFrozen() does not trigger a memory pressure notification in
// a foregrounded renderer.
TEST_F(MemoryPurgeManagerTest, PageFrozenInForegroundedRenderer) {}

TEST_F(MemoryPurgeManagerTest, PageResumedUndoMemoryPressureSuppression) {}

TEST_F(MemoryPurgeManagerTest, PageFrozenPurgeMemoryAllPagesFrozenDisabled) {}

TEST_F(MemoryPurgeManagerTest, MemoryPurgeAfterFreeze) {}

TEST_F(MemoryPurgeManagerTest, CancelMemoryPurgeAfterFreeze) {}

TEST_F(MemoryPurgeManagerTest, MemoryPurgeWithDelayNewActivePageCreated) {}

TEST_F(MemoryPurgeManagerTest, PurgeRendererMemoryWhenBackgroundedEnabled) {}

TEST_F(MemoryPurgeManagerTest, PurgeRendererMemoryWhenBackgroundedDisabled) {}

TEST_F(MemoryPurgeManagerTest,
       PurgeRendererMemoryWhenBackgroundedEnabledForegroundedBeforePurge) {}

TEST_F(MemoryPurgeManagerTest, PageFrozenAndResumedWhileBackgrounded) {}

TEST_F(MemoryPurgeManagerTest, NoMemoryPurgeIfNoPage) {}

}  // namespace

}  // namespace blink