chromium/third_party/blink/renderer/core/html/trust_token_attribute_parsing_test.cc

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

#include "third_party/blink/renderer/core/html/trust_token_attribute_parsing.h"

#include "services/network/public/mojom/trust_tokens.mojom-blink.h"
#include "services/network/test/trust_token_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/json/json_parser.h"
#include "third_party/blink/renderer/platform/json/json_values.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink::internal {
namespace {

network::mojom::blink::TrustTokenParamsPtr NetworkParamsToBlinkParams(
    network::mojom::TrustTokenParamsPtr params) {}

}  // namespace

TrustTokenAttributeParsingSuccess;

INSTANTIATE_TEST_SUITE_P();
INSTANTIATE_TEST_SUITE_P();
INSTANTIATE_TEST_SUITE_P();

// Test roundtrip serializations-then-deserializations for a collection of test
// cases covering all possible values of all enum attributes, and all
// possibilities (e.g. optional members present vs. not present) for all other
// attributes.
TEST_P(TrustTokenAttributeParsingSuccess, Roundtrip) {}

TEST(TrustTokenAttributeParsing, NotADictionary) {}

TEST(TrustTokenAttributeParsing, MissingVersion) {}

TEST(TrustTokenAttributeParsing, MissingOperation) {}

TEST(TrustTokenAttributeParsing, TypeUnsafeVersion) {}

TEST(TrustTokenAttributeParsing, TypeUnsafeOperation) {}

TEST(TrustTokenAttributeParsing, InvalidVersion) {}

TEST(TrustTokenAttributeParsing, NegativeVersionNumber) {}

TEST(TrustTokenAttributeParsing, InvalidOperation) {}

TEST(TrustTokenAttributeParsing, TypeUnsafeRefreshPolicy) {}

TEST(TrustTokenAttributeParsing, InvalidRefreshPolicy) {}

TEST(TrustTokenAttributeParsing, NonListIssuers) {}

TEST(TrustTokenAttributeParsing, EmptyIssuers) {}

TEST(TrustTokenAttributeParsing, WrongListTypeIssuers) {}

// Test that the parser requires each member of |issuers| be a valid origin.
TEST(TrustTokenAttributeParsing, NonUrlIssuer) {}

// Test that the parser requires that each member of |issuers| be a potentially
// trustworthy origin.
TEST(TrustTokenAttributeParsing, InsecureIssuer) {}

// Test that the parser requires that each member of |issuers| be a HTTP or
// HTTPS origin.
TEST(TrustTokenAttributeParsing, NonHttpNonHttpsIssuer) {}

}  // namespace blink::internal