#include "content/browser/indexed_db/indexed_db_tombstone_sweeper.h"
#include <memory>
#include <string>
#include <utility>
#include "base/files/scoped_temp_dir.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/task_environment.h"
#include "components/services/storage/indexed_db/leveldb/mock_level_db.h"
#include "components/services/storage/indexed_db/scopes/leveldb_scopes.h"
#include "components/services/storage/indexed_db/scopes/varint_coding.h"
#include "components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_database.h"
#include "components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_factory.h"
#include "content/browser/indexed_db/indexed_db_leveldb_operations.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_key_path.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_metadata.h"
#include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/leveldb_chrome.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "third_party/leveldatabase/src/include/leveldb/filter_policy.h"
#include "third_party/leveldatabase/src/include/leveldb/slice.h"
IndexedDBDatabaseMetadata;
IndexedDBIndexMetadata;
IndexedDBKey;
IndexedDBKeyPath;
IndexedDBObjectStoreMetadata;
namespace content {
class BrowserContext;
namespace indexed_db_tombstone_sweeper_unittest {
_;
Eq;
Return;
StrictMock;
Status;
constexpr int kRoundIterations = …;
constexpr int kMaxIterations = …;
constexpr int64_t kDb1 = …;
constexpr int64_t kDb2 = …;
constexpr int64_t kOs1 = …;
constexpr int64_t kOs2 = …;
constexpr int64_t kOs3 = …;
constexpr int64_t kOs4 = …;
constexpr int64_t kIndex1 = …;
constexpr int64_t kIndex2 = …;
constexpr int64_t kIndex3 = …;
MATCHER_P(SliceEq,
str,
std::string(negation ? "isn't" : "is") + " equal to " +
base::HexEncode(str.data(), str.size())) { … }
leveldb_env::Options GetLevelDBOptions() { … }
class IndexedDBTombstoneSweeperTest : public testing::Test { … };
TEST_F(IndexedDBTombstoneSweeperTest, EmptyDB) { … }
TEST_F(IndexedDBTombstoneSweeperTest, NoTombstonesComplexDB) { … }
TEST_F(IndexedDBTombstoneSweeperTest, AllTombstonesComplexDB) { … }
TEST_F(IndexedDBTombstoneSweeperTest, SimpleRealDBNoTombstones) { … }
TEST_F(IndexedDBTombstoneSweeperTest, SimpleRealDBWithTombstones) { … }
TEST_F(IndexedDBTombstoneSweeperTest, LevelDBError) { … }
}
}