chromium/content/services/auction_worklet/direct_from_seller_signals_requester_unittest.cc

// Copyright 2022 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/services/auction_worklet/direct_from_seller_signals_requester.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/location.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/strings/string_util.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/worklet_test_util.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-isolate.h"
#include "v8/include/v8-local-handle.h"

namespace auction_worklet {

namespace {

constexpr char kRequiredHeaders[] =;

constexpr char kRequiredHeadersNewName[] =;

constexpr char kRequiredHeadersBothNewAndOldNames[] =;

constexpr char kRequiredHeadersBothNewAndOldNamesMismatch[] =;

constexpr char kFalseAuctionOnly[] =;

constexpr char kFalseAuctionOnlyNewName[] =;

// The signals URL and response are arbitrary, from the point of
// DirectFromSellerSignalsRequester.
constexpr char kSignalsUrl[] =;
constexpr char kSignalsResponse[] =;

constexpr char kSignalsUrl2[] =;
constexpr char kSignalsResponse2[] =;

constexpr char kUtf8Charset[] =;

Request;

Result;

}  // namespace

class DirectFromSellerSignalsRequesterTest : public testing::Test {};

TEST_F(DirectFromSellerSignalsRequesterTest, LoadNotCached) {}

TEST_F(DirectFromSellerSignalsRequesterTest, LoadCached) {}

TEST_F(DirectFromSellerSignalsRequesterTest, LoadCoalesced) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CacheOverwrite) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CantCoalesce) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CancelNotCached) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CancelCached) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CancelCoalesced) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CancelCoalescedFirstRequest) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CancelCoalescedAllRequests) {}

TEST_F(DirectFromSellerSignalsRequesterTest, CancelAndRequestAgain) {}

TEST_F(DirectFromSellerSignalsRequesterTest, BadJson) {}

TEST_F(DirectFromSellerSignalsRequesterTest, MissingAuctionOnly) {}

TEST_F(DirectFromSellerSignalsRequesterTest, NewHeaderName) {}

TEST_F(DirectFromSellerSignalsRequesterTest, BothNewAndOldHeaderNames) {}

TEST_F(DirectFromSellerSignalsRequesterTest, BothNewAndOldHeaderNamesMismatch) {}

TEST_F(DirectFromSellerSignalsRequesterTest, BadAuctionOnly) {}

TEST_F(DirectFromSellerSignalsRequesterTest, BadAuctionOnlyNewName) {}

TEST_F(DirectFromSellerSignalsRequesterTest,
       DeleteRequestWhileRunningCallback) {}

TEST_F(DirectFromSellerSignalsRequesterTest,
       CompletedRequestsCantCancelOtherRequests) {}

}  // namespace auction_worklet