chromium/third_party/blink/renderer/platform/loader/fetch/resource_request_test.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.

#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"

#include <memory>
#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/public/common/permissions_policy/permissions_policy.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/weborigin/referrer.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "url/origin.h"

namespace blink {

namespace {

std::unique_ptr<PermissionsPolicy> CreateFromParentPolicy(
    const PermissionsPolicy* parent,
    ParsedPermissionsPolicy header_policy,
    const url::Origin& origin) {}

}  // namespace

TEST(ResourceRequestTest, SetHasUserGesture) {}

TEST(ResourceRequestTest, SetIsAdResource) {}

TEST(ResourceRequestTest, UpgradeIfInsecureAcrossRedirects) {}

// A cross-origin subresource request that explicitly sets an opt-in flag (e.g.
// `browsingTopics`, `sharedStorageWritable`) should have the corresponding
// permission as long as it passes the allowlist check, regardless of the
// feature's default state.
TEST(ResourceRequestTest, IsFeatureEnabledForSubresourceRequestAssumingOptIn) {}

}  // namespace blink