// 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/common/pseudonymization_salt.h" #include <tuple> #include "base/test/gtest_util.h" #include "testing/gtest/include/gtest/gtest.h" namespace content { class PseudonymizationSaltTest : public ::testing::Test { … }; PseudonymizationSaltDeathTest; TEST_F(PseudonymizationSaltTest, SetAndGetSalt) { … } // Early during process startup (before Browser process reaches salt // initialization; or before a Child process receives the salt over IPC), the // pseudonymization salt is not initialized and is invalid - this test verifies // presence of a DCHECK in GetPseudonymizationSalt that verifies that // GetPseudonymizationSalt is only called after salt initialization. // // See also https://crbug.com/1339992 which should move salt initialization // much earlier in Renderer processes (and other Child and Utility processes). TEST_F(PseudonymizationSaltDeathTest, GetEmptySalt) { … } TEST_F(PseudonymizationSaltDeathTest, SetTwoDifferentSalts) { … } TEST_F(PseudonymizationSaltDeathTest, SetZeroSalt) { … } TEST_F(PseudonymizationSaltTest, SetTwoSaltsAllowed) { … } } // namespace content