chromium/extensions/browser/verified_contents_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

// Loads verified_contents file from a sub directory under
// kContentVerifierDirectory.
std::unique_ptr<VerifiedContents> CreateTestVerifiedContents(
    const char* sub_dir,
    const char* verified_contents_filename) {}

}  // namespace

TEST(VerifiedContents, Simple) {}

TEST(VerifiedContents, FailsOnBase64) {}

// Tests behavior of verified contents with filenames that have "." and " "
// suffixes appened to them.
// Regression test for https://crbug.com/696208.
TEST(VerifiedContents, DotSpaceSuffixedFiles) {}

// Tests behavior of verified_contents.json file containing keys already with
// "." suffix.
// Regression test for https://crbug.com/696208.
TEST(VerifiedContents, VerifiedContentsFileContainsDotSuffixedFilename) {}

}  // namespace extensions