chromium/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping_test.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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.h"

#include <algorithm>
#include <limits>
#include <memory>

#include "base/memory/scoped_refptr.h"
#include "base/strings/strcat.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_key.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_key_path.h"
#include "third_party/blink/renderer/modules/indexeddb/idb_value.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "v8/include/v8.h"

namespace blink {

TEST(IDBValueWrapperTest, WriteVarIntOneByte) {}

TEST(IDBValueWrapperTest, WriteVarIntMultiByte) {}

TEST(IDBValueWrapperTest, WriteVarIntMultiByteEdgeCases) {}

// Friend class of IDBValueUnwrapper with access to its internals.
class IDBValueUnwrapperReadTestHelper {};

TEST(IDBValueUnwrapperTest, ReadVarIntOneByte) {}

TEST(IDBValueUnwrapperTest, ReadVarIntMultiBytes) {}

TEST(IDBValueUnwrapperTest, ReadVarIntMultiByteEdgeCases) {}

TEST(IDBValueUnwrapperTest, ReadVarIntTruncatedInput) {}

TEST(IDBValueUnwrapperTest, ReadVarIntDenormalizedInput) {}

TEST(IDBValueUnwrapperTest, WriteVarIntMaxUnsignedRoundtrip) {}

TEST(IDBValueUnwrapperTest, ReadBytes) {}

TEST(IDBValueUnwrapperTest, ReadBytesTruncatedInput) {}

TEST(IDBValueUnwrapperTest, ReadBytesDenormalizedInput) {}

TEST(IDBValueUnwrapperTest, IsWrapped) {}

TEST(IDBValueUnwrapperTest, Compression) {}

// Verifies that the decompression code should still run and succeed on
// compressed data even if the flag is disabled. This is required to be able to
// decompress existing data that has been persisted to disk if/when compression
// is later disabled.
TEST(IDBValueUnwrapperTest, Decompression) {}

}  // namespace blink