#include "components/breadcrumbs/core/breadcrumb_persistent_storage_manager.h"
#include <memory>
#include <string>
#include <vector>
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/test/task_environment.h"
#include "components/breadcrumbs/core/breadcrumb_manager_keyed_service.h"
#include "components/breadcrumbs/core/breadcrumb_persistent_storage_util.h"
#include "testing/platform_test.h"
namespace breadcrumbs {
namespace {
constexpr unsigned long kEventCountTooManyForPersisting = …;
bool ValidatePersistedEvents(const std::string& last_logged_event,
std::vector<std::string> persisted_events) { … }
}
class BreadcrumbPersistentStorageManagerTest : public PlatformTest { … };
TEST_F(BreadcrumbPersistentStorageManagerTest, PersistEvents) { … }
TEST_F(BreadcrumbPersistentStorageManagerTest, PersistLargeBucket) { … }
TEST_F(BreadcrumbPersistentStorageManagerTest, PersistManyEventsOverTime) { … }
TEST_F(BreadcrumbPersistentStorageManagerTest,
GetStoredEventsAfterFilesizeReduction) { … }
TEST_F(BreadcrumbPersistentStorageManagerTest, ChangeMetricsConsent) { … }
}