#include "content/browser/fenced_frame/fenced_frame_url_mapping.h"
#include <optional>
#include "base/functional/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "content/browser/fenced_frame/fenced_frame_reporter.h"
#include "content/public/test/test_renderer_host.h"
#include "content/test/fenced_frame_test_utils.h"
#include "net/base/schemeful_site.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/fenced_frame/fenced_frame_utils.h"
#include "third_party/blink/public/common/interest_group/ad_auction_constants.h"
#include "third_party/blink/public/common/interest_group/ad_display_size.h"
#include "url/gurl.h"
#include "url/origin.h"
#include "url/url_constants.h"
namespace content {
namespace {
void ValidatePendingAdComponentsMap(
FencedFrameURLMapping* fenced_frame_url_mapping,
bool add_to_new_map,
const std::vector<std::pair<GURL, FencedFrameConfig>>&
nested_urn_config_pairs,
std::vector<blink::AdDescriptor> expected_mapped_ad_descriptors) { … }
GURL GenerateAndVerifyPendingMappedURN(
FencedFrameURLMapping* fenced_frame_url_mapping) { … }
class FencedFrameURLMappingTest : public RenderViewHostTestHarness { … };
}
TEST_F(FencedFrameURLMappingTest, AddAndConvert) { … }
TEST_F(FencedFrameURLMappingTest, NonExistentUUID) { … }
TEST_F(FencedFrameURLMappingTest, PendingMappedUUID) { … }
TEST_F(FencedFrameURLMappingTest, RemoveObserverOnPendingMappedUUID) { … }
TEST_F(FencedFrameURLMappingTest, RegisterTwoObservers) { … }
TEST_F(FencedFrameURLMappingTest,
AssignFencedFrameURLAndInterestGroupInfoNoAdComponentsUrls) { … }
TEST_F(FencedFrameURLMappingTest,
AssignFencedFrameURLAndInterestGroupInfoOneAdComponentUrl) { … }
TEST_F(FencedFrameURLMappingTest,
AssignFencedFrameURLAndInterestGroupInfoMaxAdComponentUrl) { … }
TEST_F(FencedFrameURLMappingTest,
AssignFencedFrameURLAndInterestGroupInfoMaxIdenticalAdComponentUrl) { … }
TEST_F(FencedFrameURLMappingTest, SubstituteFencedFrameURLs) { … }
TEST_F(FencedFrameURLMappingTest, HasCorrectFormat) { … }
TEST_F(FencedFrameURLMappingTest, ReportingMetadataSuccess) { … }
TEST_F(FencedFrameURLMappingTest, ReporterSuccessWithInterestGroupInfo) { … }
TEST_F(FencedFrameURLMappingTest, ExceedNumOfUrnMappingsLimitFailsAddURL) { … }
}