#include "components/bookmarks/browser/bookmark_storage.h"
#include <optional>
#include <string>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/test/test_file_util.h"
#include "base/time/time.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/test/test_bookmark_client.h"
#include "components/sync/base/features.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace bookmarks {
namespace {
base::FilePath GetTestBookmarksFileNameInNewTempDir() { … }
std::unique_ptr<BookmarkModel> CreateModelWithOneBookmark() { … }
std::optional<base::Value::Dict> ReadFileToDict(
const base::FilePath& file_path) { … }
}
TEST(BookmarkStorageTest, ShouldSaveFileToDiskAfterDelay) { … }
TEST(BookmarkStorageTest, ShouldSaveFileDespiteShutdownWhileScheduled) { … }
TEST(BookmarkStorageTest, ShouldGenerateBackupFileUponFirstSave) { … }
TEST(BookmarkStorageTest, RecordTimeSinceLastScheduledSave) { … }
TEST(BookmarkStorageTest, ShouldSaveAccountNodes) { … }
TEST(BookmarkStorageTest, ShouldSaveDespiteAccountBookmarksEmpty) { … }
}