#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/drive/resource_metadata_storage.h"
#include <stddef.h>
#include <stdint.h>
#include <utility>
#include "base/containers/contains.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "base/task/single_thread_task_runner.h"
#include "components/drive/drive.pb.h"
#include "components/drive/file_system_core_util.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
namespace drive {
namespace internal {
namespace {
struct DestroyHelperForTests { … };
}
class ResourceMetadataStorageTest : public testing::Test { … };
TEST_F(ResourceMetadataStorageTest, LargestChangestamp) { … }
TEST_F(ResourceMetadataStorageTest, StartPageToken) { … }
TEST_F(ResourceMetadataStorageTest, PutEntry) { … }
TEST_F(ResourceMetadataStorageTest, Iterator) { … }
TEST_F(ResourceMetadataStorageTest, GetIdByResourceId) { … }
TEST_F(ResourceMetadataStorageTest, GetChildren) { … }
TEST_F(ResourceMetadataStorageTest, OpenExistingDB) { … }
TEST_F(ResourceMetadataStorageTest, IncompatibleDB_M29) { … }
TEST_F(ResourceMetadataStorageTest, IncompatibleDB_M32) { … }
TEST_F(ResourceMetadataStorageTest, IncompatibleDB_M33) { … }
TEST_F(ResourceMetadataStorageTest, IncompatibleDB_Unknown) { … }
TEST_F(ResourceMetadataStorageTest, IncompatibleDB_M37) { … }
TEST_F(ResourceMetadataStorageTest, WrongPath) { … }
TEST_F(ResourceMetadataStorageTest, RecoverCacheEntriesFromTrashedResourceMap) { … }
TEST_F(ResourceMetadataStorageTest, CheckValidity) { … }
TEST_F(ResourceMetadataStorageTest, UpgradeDBv15) { … }
TEST_F(ResourceMetadataStorageTest, UpgradeDBv16) { … }
}
}