#include <stdint.h>
#include <string>
#include <vector>
#include "base/base64url.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "build/build_config.h"
#include "extensions/browser/content_verifier/content_verifier_utils.h"
#include "extensions/browser/verified_contents.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_paths.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
const char kContentVerifierDirectory[] = …;
const char kPublicKeyPem[] = …;
constexpr bool kIsFileAccessCaseInsensitive = …;
constexpr bool kIsDotSpaceSuffixIgnored = …;
std::string DecodeBase64Url(const std::string& encoded) { … }
bool GetPublicKey(const base::FilePath& path, std::string* public_key) { … }
base::FilePath GetTestDir(const char* sub_dir) { … }
std::unique_ptr<VerifiedContents> CreateTestVerifiedContents(
const char* sub_dir,
const char* verified_contents_filename) { … }
}
TEST(VerifiedContents, Simple) { … }
TEST(VerifiedContents, FailsOnBase64) { … }
TEST(VerifiedContents, DotSpaceSuffixedFiles) { … }
TEST(VerifiedContents, VerifiedContentsFileContainsDotSuffixedFilename) { … }
}