chromium/chrome/browser/sessions/session_data_service_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 "chrome/browser/sessions/session_data_service.h"

#include <memory>

#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_special_storage_policy.h"
#include "chrome/browser/lifetime/browser_shutdown.h"
#include "chrome/browser/sessions/session_data_deleter.h"
#include "chrome/browser/sessions/sessions_features.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/content_settings.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Invoke;
Mock;
StrictMock;

namespace {
// A test version of SessionDataDeleter that doesn't actually do any deletion.
class TestSessionDataDeleter : public SessionDataDeleter {};

// Helper to run the callback received by DeleteSessionOnlyData.
void RunCallback(bool skip_session_cookies, base::OnceClosure callback) {}
}  // namespace

class SessionDataServiceTest : public BrowserWithTestWindowTest {};

TEST_F(SessionDataServiceTest, StartCleanup) {}

TEST_F(SessionDataServiceTest, CleanupOnWindowClosed) {}

TEST_F(SessionDataServiceTest, CleanupOnWindowClosedWithOtherProfileOpen) {}

TEST_F(SessionDataServiceTest, RepeatCleanupAfterNewWindowOpened) {}

TEST_F(SessionDataServiceTest, SkipOnShutdown) {}

TEST_F(SessionDataServiceTest, NoContinuedDeletionWithoutSettings) {}

TEST_F(SessionDataServiceTest, ContinueUnfinishedDeletions) {}

TEST_F(SessionDataServiceTest, ContinueUnfinishedDeletionsFeatureDisabled) {}

TEST_F(SessionDataServiceTest, SkipOnForceSessionState) {}