chromium/third_party/blink/renderer/platform/loader/fetch/cached_metadata_test.cc

// Copyright 2024 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/platform/loader/fetch/cached_metadata.h"

#include "base/containers/span.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace blink {

namespace {

const uint32_t kTestDataTypeId =;
const uint64_t kTestTag =;

const uint8_t kTestData[] =;

Vector<uint8_t> CreateTestSerializedDataWithMarker(uint32_t marker) {}

// Creates a test serialized data with the valid marker.
Vector<uint8_t> CreateTestSerializedData() {}

void CheckTestCachedMetadata(scoped_refptr<CachedMetadata> cached_metadata) {}

TEST(CachedMetadataTest, GetSerializedDataHeader) {}

TEST(CachedMetadataTest, CreateFromBufferWithDataTypeIdAndTag) {}

TEST(CachedMetadataTest, CreateFromSerializedDataBuffer) {}

TEST(CachedMetadataTest, CreateFromSerializedDataVector) {}

TEST(CachedMetadataTest, CreateFromSerializedDataBigBuffer) {}

TEST(CachedMetadataTest, CreateFromSerializedDataTooSmall) {}

TEST(CachedMetadataTest, CreateFromSerializedDataWithInvalidMarker) {}

}  // namespace
}  // namespace blink