chromium/content/browser/indexed_db/indexed_db_pre_close_task_queue_unittest.cc

// Copyright 2017 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_pre_close_task_queue.h"

#include <memory>
#include <string>
#include <utility>

#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/timer/mock_timer.h"
#include "base/timer/timer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/indexeddb/indexeddb_metadata.h"

IndexedDBDatabaseMetadata;

namespace content {

PreCloseTask;

namespace {
constexpr base::TimeDelta kTestMaxRunTime =;
const std::u16string kDBName =;
constexpr int64_t kDBId =;
constexpr int64_t kDBVersion =;
constexpr int64_t kDBMaxObjectStoreId =;

ACTION_P2(RunClosureThenReturn, closure, ret) {}

class MockPreCloseTask : public PreCloseTask {};

void SetBoolValue(bool* pointer, bool value_to_set) {}

leveldb::Status MetadataFetcher(
    bool* called,
    leveldb::Status return_status,
    std::vector<IndexedDBDatabaseMetadata>* metadata,
    std::vector<IndexedDBDatabaseMetadata>* output_metadata) {}

class IndexedDBPreCloseTaskQueueTest : public testing::Test {};

TEST_F(IndexedDBPreCloseTaskQueueTest, NoTasks) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, TaskOneRound) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, TaskTwoRounds) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, TwoTasks) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, StopForNewConnectionBeforeStart) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, StopForNewConnectionAfterRound) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, StopForNewConnectionAfterTaskCompletes) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, StopForTimout) {}

TEST_F(IndexedDBPreCloseTaskQueueTest, MetadataError) {}

}  // namespace

}  // namespace content