chromium/extensions/common/permissions/permission_message_test_util.cc

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

#include "extensions/common/permissions/permission_message_test_util.h"

#include <stddef.h>

#include <iterator>

#include "base/logging.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "extensions/common/permissions/permission_message_provider.h"
#include "extensions/common/permissions/permissions_data.h"

namespace extensions {

namespace {

PermissionMessages GetMessages(const PermissionSet& permissions,
                               Manifest::Type extension_type) {}

std::vector<std::u16string> MakeVectorString16(
    const std::vector<std::string>& vec) {}

std::vector<std::vector<std::u16string>> MakeVectorVectorString16(
    const std::vector<std::vector<std::string>>& vecs) {}

// Returns the vector of messages concatenated into a single string, separated
// by newlines, e.g.: "Bar"\n"Baz"\n
std::string MessagesVectorToString(
    const std::vector<std::u16string>& messages) {}

std::string MessagesToString(const PermissionMessages& messages) {}

bool CheckThatSubmessagesMatch(
    const std::u16string& message,
    const std::vector<std::u16string>& expected_submessages,
    const std::vector<std::u16string>& actual_submessages) {}

testing::AssertionResult VerifyHasPermissionMessageImpl(
    const std::u16string& expected_message,
    const std::vector<std::u16string>& expected_submessages,
    const PermissionMessages& actual_messages) {}

testing::AssertionResult VerifyPermissionMessagesWithSubmessagesImpl(
    const std::vector<std::u16string>& expected_messages,
    const std::vector<std::vector<std::u16string>>& expected_submessages,
    const PermissionMessages& actual_messages,
    bool check_order) {}

}  // namespace

testing::AssertionResult VerifyHasPermissionMessage(
    const PermissionsData* permissions_data,
    const std::u16string& expected_message) {}

testing::AssertionResult VerifyHasPermissionMessage(
    const PermissionSet& permissions,
    Manifest::Type extension_type,
    const std::string& expected_message) {}

testing::AssertionResult VerifyNoPermissionMessages(
    const PermissionsData* permissions_data) {}

testing::AssertionResult VerifyOnePermissionMessage(
    const PermissionsData* permissions_data,
    const std::string& expected_message) {}

testing::AssertionResult VerifyOnePermissionMessage(
    const PermissionsData* permissions_data,
    const std::u16string& expected_message) {}

testing::AssertionResult VerifyOnePermissionMessage(
    const PermissionSet& permissions,
    Manifest::Type extension_type,
    const std::u16string& expected_message) {}

testing::AssertionResult VerifyOnePermissionMessageWithSubmessages(
    const PermissionsData* permissions_data,
    const std::string& expected_message,
    const std::vector<std::string>& expected_submessages) {}

testing::AssertionResult VerifyTwoPermissionMessages(
    const PermissionsData* permissions_data,
    const std::string& expected_message_1,
    const std::string& expected_message_2,
    bool check_order) {}

testing::AssertionResult VerifyPermissionMessages(
    const PermissionsData* permissions_data,
    const std::vector<std::string>& expected_messages,
    bool check_order) {}

testing::AssertionResult VerifyPermissionMessages(
    const PermissionsData* permissions_data,
    const std::vector<std::u16string>& expected_messages,
    bool check_order) {}

testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
    const PermissionsData* permissions_data,
    const std::vector<std::string>& expected_messages,
    const std::vector<std::vector<std::string>>& expected_submessages,
    bool check_order) {}

testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
    const PermissionsData* permissions_data,
    const std::vector<std::u16string>& expected_messages,
    const std::vector<std::vector<std::u16string>>& expected_submessages,
    bool check_order) {}

}  // namespace extensions