chromium/content/browser/interest_group/header_direct_from_seller_signals_unittest.cc

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

#include "content/browser/interest_group/header_direct_from_seller_signals.h"

#include <stddef.h>

#include <algorithm>
#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "services/data_decoder/public/cpp/data_decoder.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"

namespace content {

namespace {

Eq;
IsEmpty;
MatchesRegex;
Pair;
UnorderedElementsAre;
UnorderedElementsAreArray;

constexpr char kOriginStringA[] =;
constexpr char kOriginStringB[] =;

class HeaderDirectFromSellerSignalsTest : public ::testing::Test {};

TEST_F(HeaderDirectFromSellerSignalsTest, DefaultConstruct) {}

TEST_F(HeaderDirectFromSellerSignalsTest, Valid) {}

TEST_F(HeaderDirectFromSellerSignalsTest, TwoOrigins) {}

TEST_F(HeaderDirectFromSellerSignalsTest, InvalidAndOrNotFound) {}

TEST_F(HeaderDirectFromSellerSignalsTest, ContinueOnInvalid) {}

TEST_F(HeaderDirectFromSellerSignalsTest, OverwriteOldAdSlotSignals) {}

// Same as OverwriteOldAdSlotSignals, but the signals aren't parsed before
// ParseAndRun() is invoked.
TEST_F(HeaderDirectFromSellerSignalsTest,
       AsyncOrder_OverwriteOldAdSlotSignals) {}

// A response is received, and ParseAndFind() is called before the response is
// processed.
TEST_F(HeaderDirectFromSellerSignalsTest,
       AsyncOrder_ParseAndFindBeforeResponseProcessed) {}

// Two responses are received, and ParseAndFind() is called before the responses
// are processed.
TEST_F(HeaderDirectFromSellerSignalsTest,
       AsyncOrder_ParseAndFindBefore2ResponsesProcessed) {}

// A response is received, ParseAndFind() is called, then another response is
// received, and then processing completes.
TEST_F(HeaderDirectFromSellerSignalsTest,
       AsyncOrder_ParseAndFindBetween2Responses) {}

// Two responses with errors are received, and ParseAndFind() is called before
// the responses are processed.
TEST_F(HeaderDirectFromSellerSignalsTest,
       AsyncOrder_ParseAndFindBefore2ResponsesProcessedWithErrors) {}

TEST_F(HeaderDirectFromSellerSignalsTest,
       AsyncOrder_DeleteDecoderDuringParsing) {}

}  // namespace

}  // namespace content