chromium/chrome/browser/downgrade/snapshot_manager_unittest.cc

// Copyright 2020 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/downgrade/snapshot_manager.h"

#include "base/containers/adapters.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/downgrade/downgrade_utils.h"
#include "chrome/browser/downgrade/snapshot_file_collector.h"
#include "chrome/browser/downgrade/user_data_downgrade.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace downgrade {

namespace {

constexpr base::FilePath::StringPieceType kSomeFolder =);
constexpr base::FilePath::StringPieceType kSomeFile =);
constexpr base::FilePath::StringPieceType kSomeFolderFile =);
constexpr base::FilePath::StringPieceType kSomeSubFolder =);
constexpr base::FilePath::StringPieceType kSomeSubFile =);

constexpr base::FilePath::StringPieceType kUserDataFolder =);
constexpr base::FilePath::StringPieceType kProfileDataFolder =);
constexpr base::FilePath::StringPieceType kUserDataFile =);
constexpr base::FilePath::StringPieceType kProfileDataFile =);
constexpr base::FilePath::StringPieceType kProfileDataJournalFile =);
constexpr base::FilePath::StringPieceType kProfileDataExtFile =);
constexpr base::FilePath::StringPieceType kProfileDataExtWalFile =);
constexpr base::FilePath::StringPieceType kProfileDataExtShmFile =);

constexpr std::array<base::FilePath::StringPieceType, 3>
    kProfileDirectoryBaseNames =;

// Structure containing a folders and files structure for tests.
// root
// |_ SomeFile
// |_ Some Folder
//    |_ Some File
//    |_ Some Sub Folder
//       |_ Some Sub File
class TestFolderAndFiles {};

}  // namespace

class TestSnapshotManager : public SnapshotManager {};

class SnapshotManagerTest : public testing::Test {};

TEST_F(SnapshotManagerTest, TakeSnapshot) {}

TEST_F(SnapshotManagerTest, RestoreSnapshotOlderVersionAvailable) {}

TEST_F(SnapshotManagerTest, RestoreSnapshotTargetVersionAvailable) {}

TEST_F(SnapshotManagerTest, RestoreSnapshotIgnoresIncompleteSnapshots) {}

TEST_F(SnapshotManagerTest, PurgeInvalidAndOldSnapshotsKeepsMaxValidSnapshots) {}

TEST_F(SnapshotManagerTest, PurgeInvalidAndOldSnapshotsKeepsValidSnapshots) {}

TEST_F(SnapshotManagerTest,
       PurgeInvalidAndOldSnapshotsKeepsValidSnapshotsPerMilestone) {}

}  // namespace downgrade