chromium/storage/common/database/database_identifier_unittest.cc

// Copyright 2014 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 "storage/common/database/database_identifier.h"

#include <stddef.h>

#include <string>

#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_features.h"

namespace storage {

TEST(DatabaseIdentifierTest, CreateIdentifierFromOrigin) {}

// This tests the encoding of a hostname including every character in the range
// [\x1f, \x80].
TEST(DatabaseIdentifierTest, CreateIdentifierAllHostChars) {}

// Non-special URLs behavior is affected by the
// StandardCompliantNonSpecialSchemeURLParsing feature.
// See https://crbug.com/40063064 for details.
class DatabaseIdentifierParamTest : public testing::TestWithParam<bool> {};

// Use a parameterized test here to ensure that
// StandardCompliantNonSpecialSchemeURLParsing feature doesn't change the
// behavior of DatabaseIdentifier.
TEST_P(DatabaseIdentifierParamTest, ExtractOriginDataFromIdentifier) {}

INSTANTIATE_TEST_SUITE_P();

static GURL GURLToAndFromOriginIdentifier(const GURL& origin_url) {}

static url::Origin OriginToAndFromOriginIdentifier(const url::Origin& origin) {}

static void TestValidOriginIdentifier(bool expected_result,
                                      const std::string& id) {}

TEST(DatabaseIdentifierTest, OriginIdentifiers) {}

TEST(DatabaseIdentifierTest, IsValidOriginIdentifier) {}

}  // namespace storage