#include "chrome/browser/component_updater/zxcvbn_data_component_installer.h"
#include <optional>
#include <string_view>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/strings/string_split.h"
#include "base/test/task_environment.h"
#include "base/values.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zxcvbn-cpp/native-src/zxcvbn/frequency_lists.hpp"
namespace component_updater {
namespace {
Pair;
Pointee;
UnorderedElementsAre;
constexpr char kTextfilesOnlyVersion[] = …;
constexpr char kMemoryMappedVersion[] = …;
constexpr char kFutureVersion[] = …;
zxcvbn::RankedDicts ParseRankedDictionaries(const base::FilePath& install_dir) { … }
}
class ZxcvbnDataComponentInstallerPolicyTest : public ::testing::Test { … };
TEST_F(ZxcvbnDataComponentInstallerPolicyTest,
VerifyInstallationForMemoryMappedVersion) { … }
TEST_F(ZxcvbnDataComponentInstallerPolicyTest,
VerifyInstallationForMemoryMappedVersionWithInvalidMarkerBit) { … }
TEST_F(ZxcvbnDataComponentInstallerPolicyTest,
VerifyInstallationExpectsValidVersion) { … }
TEST_F(ZxcvbnDataComponentInstallerPolicyTest, ComponentReadyForMissingFiles) { … }
TEST_F(ZxcvbnDataComponentInstallerPolicyTest,
ComponentReadyForMemoryMappedVersion) { … }
TEST_F(ZxcvbnDataComponentInstallerPolicyTest,
ComponentReadyHandlesUpdateProperly) { … }
}