#include "content/services/auction_worklet/trusted_signals.h"
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "content/common/features.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/worklet_test_util.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/http/http_status_code.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "v8/include/v8-context.h"
#include "v8/include/v8-forward.h"
namespace auction_worklet {
namespace {
const char kBiddingJsonV1[] = …;
const char kBaseBiddingJson[] = …;
const char kBaseScoringJsonOldNames[] = …;
const char kBaseScoringJson[] = …;
const char kBaseScoringJsonNewAndOldNames[] = …;
const char kHostname[] = …;
class TrustedSignalsTest : public testing::Test { … };
TEST_F(TrustedSignalsTest, BiddingSignalsNetworkError) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsNetworkError) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsResponseNotJsonObject) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsResponseNotJsonObject) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsInvalidVersion) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsResponseNotObject) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsResponseNotObject) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsExpectedEntriesNotPresent) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsExpectedEntriesNotPresent) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsNestedEntriesNotObject) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsInvalidPriorityVectors) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsNestedEntriesNotObjects) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsKeyMissing) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsKeyMissingNameInProto) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsKeysMissing) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsOneKey) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsOneKeyOldHeaderName) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsOneKeyHeaderName) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsOneKeyBothOldAndNewHeaderNames) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsForOneRenderUrl) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsMultipleKeys) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsMultipleUrls) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsOldNames) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsNewAndOldNames) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsDuplicateKeys) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsDuplicateKeys) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsSharedUrl) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsEscapeQueryParams) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsEscapeQueryParams) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsDeleteBeforeCallback) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsDeleteBeforeCallback) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsWithDataVersion) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsWithInvalidDataVersion) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsExperimentId) { … }
TEST_F(TrustedSignalsTest, ScoringSignalsExperimentId) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsAdditionalQueryParams) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsV1) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsV1WithV1Header) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsV2HeaderV1Body) { … }
TEST_F(TrustedSignalsTest, BiddingSignalsV1HeaderV2Body) { … }
}
}