chromium/third_party/blink/renderer/core/frame/document_policy_violation_report_body_test.cc

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

#include "third_party/blink/renderer/core/frame/document_policy_violation_report_body.h"

#include <set>
#include <vector>

#include "testing/gtest/include/gtest/gtest.h"

namespace blink {
namespace {

// Test whether DocumentPolicyViolationReportBody::MatchId() is a pure function,
// i.e. same input will give same return value. The input values are randomly
// picked values.
TEST(DocumentPolicyViolationReportBodyMatchIdTest,
     SameInputGeneratesSameMatchId) {}

bool AllDistinct(const std::vector<unsigned>& match_ids) {}

const struct {} kDocumentPolicyViolationReportBodyInputs[] =;

TEST(DocumentPolicyViolationReportBodyMatchIdTest,
     DifferentInputsGenerateDifferentMatchId) {}

TEST(DocumentPolicyViolationReportBodyMatchIdTest,
     MatchIdGeneratedShouldNotBeZero) {}

// In |DocumentPolicyViolationReportBody|, empty message string and null message
// string are both treated as empty string and a default message will be
// generated.
TEST(DocumentPolicyViolationReportBodyMatchIdTest,
     EmptyMessageGenerateSameResult) {}

}  // namespace
}  // namespace blink