chromium/third_party/blink/renderer/core/frame/location_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/location_report_body.h"

#include <set>
#include <vector>

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

namespace blink {
namespace {

class TestLocationReportBody : public LocationReportBody {};

// Test whether LocationReportBody::MatchId() is a pure function, i.e. same
// input will give same return value.
TEST(LocationReportBodyMatchIdTest, SameInputGeneratesSameMatchId) {}

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

const struct {} kLocationReportBodyInputs[] =;

TEST(LocationReportBodyMatchIdTest, DifferentInputsGenerateDifferentMatchId) {}

TEST(LocationReportBodyMatchIdTest, MatchIdGeneratedShouldNotBeZero) {}

// When URL is empty, LocationReportBody would call |CaptureSourceLocation()|
// to determine the location, and ignore |line_number| and |column_number|
// specified in constructor params.
TEST(LocationReportBodyMatchIdTest,
     EmptyURLGenerateSameMatchIdRegardlessOfOtherParams) {}

}  // namespace
}  // namespace blink