#include "components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.h"
#include <string>
#include <string_view>
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/scoped_observation.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/with_feature_override.h"
#include "base/version.h"
#include "components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations_histograms.h"
#include "components/privacy_sandbox/privacy_sandbox_attestations/proto/privacy_sandbox_attestations.pb.h"
#include "components/privacy_sandbox/privacy_sandbox_attestations/scoped_privacy_sandbox_attestations.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
#include "content/public/browser/privacy_sandbox_attestations_observer.h"
#include "content/public/test/browser_task_environment.h"
#include "net/base/schemeful_site.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace privacy_sandbox {
namespace {
class MockAttestationsObserver
: public content::PrivacySandboxAttestationsObserver { … };
}
class PrivacySandboxAttestationsTestBase : public testing::Test { … };
TEST_F(PrivacySandboxAttestationsTestBase, AddOverride) { … }
class PrivacySandboxAttestationsFeatureEnabledTest
: public base::test::WithFeatureOverride,
public PrivacySandboxAttestationsTestBase { … };
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
AttestationsBehaviorWithMapBeingAbsent) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
DefaultDenyIfAttestationsComponentNotYetReady) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest, AttestedIfOverridden) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
EnrolledWithoutAttestations) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest, EnrolledAndAttested) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
NonExistentAttestationsFile) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
TryParseNonExistentAttestationsFileTwice) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
InvalidAttestationsFileIsNotLoaded) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest, LoadAttestationsFile) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
AttestationFirstCheckTimeHistogram) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
LoadAttestationsFilePauseDuringParsing) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
OlderVersionAttestationsFileIsNotLoaded) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
NewerVersionAttestationsFileIsLoaded) { … }
TEST_P(PrivacySandboxAttestationsFeatureEnabledTest,
CombiningCharacterFilePath) { … }
INSTANTIATE_FEATURE_OVERRIDE_TEST_SUITE(…);
}