chromium/content/browser/indexed_db/indexed_db_database_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/indexed_db/indexed_db_database.h"

#include <stdint.h>

#include <set>
#include <string>
#include <utility>

#include "base/auto_reset.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "components/services/storage/indexed_db/locks/partitioned_lock_manager.h"
#include "components/services/storage/privileged/mojom/indexed_db_client_state_checker.mojom.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "content/browser/indexed_db/indexed_db_backing_store.h"
#include "content/browser/indexed_db/indexed_db_bucket_context.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
#include "content/browser/indexed_db/indexed_db_cursor.h"
#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
#include "content/browser/indexed_db/indexed_db_factory_client.h"
#include "content/browser/indexed_db/indexed_db_fake_backing_store.h"
#include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
#include "content/browser/indexed_db/indexed_db_transaction.h"
#include "content/browser/indexed_db/indexed_db_value.h"
#include "content/browser/indexed_db/mock_indexed_db_factory_client.h"
#include "content/browser/indexed_db/mock_mojo_indexed_db_database_callbacks.h"
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "storage/browser/test/mock_quota_manager.h"
#include "storage/browser/test/mock_quota_manager_proxy.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"

IndexedDBDatabaseMetadata;
IndexedDBIndexKeys;
IndexedDBKey;
IndexedDBKeyPath;

namespace content {

class IndexedDBDatabaseTest : public ::testing::Test {};

TEST_F(IndexedDBDatabaseTest, ConnectionLifecycle) {}

TEST_F(IndexedDBDatabaseTest, ForcedClose) {}

namespace {

class MockFactoryClient : public IndexedDBFactoryClient {};

}  // namespace

TEST_F(IndexedDBDatabaseTest, PendingDelete) {}

TEST_F(IndexedDBDatabaseTest, OpenDeleteClear) {}

TEST_F(IndexedDBDatabaseTest, ForceDelete) {}

TEST_F(IndexedDBDatabaseTest, ForceCloseWhileOpenPending) {}

TEST_F(IndexedDBDatabaseTest, ForceCloseWhileOpenAndDeletePending) {}

leveldb::Status DummyOperation(IndexedDBTransaction* transaction) {}

class IndexedDBDatabaseOperationTest : public IndexedDBDatabaseTest {};

TEST_F(IndexedDBDatabaseOperationTest, CreateObjectStore) {}

TEST_F(IndexedDBDatabaseOperationTest, CreateIndex) {}

class IndexedDBDatabaseOperationAbortTest
    : public IndexedDBDatabaseOperationTest {};

TEST_F(IndexedDBDatabaseOperationAbortTest, CreateObjectStore) {}

TEST_F(IndexedDBDatabaseOperationAbortTest, CreateIndex) {}

TEST_F(IndexedDBDatabaseOperationTest, CreatePutDelete) {}

}  // namespace content