chromium/components/metrics/reporting_service_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 "components/metrics/reporting_service.h"

#include <stdint.h>

#include <deque>
#include <memory>
#include <string>
#include <string_view>

#include "base/functional/bind.h"
#include "base/hash/sha1.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "components/metrics/log_store.h"
#include "components/metrics/metrics_log.h"
#include "components/metrics/test/test_metrics_service_client.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zlib/google/compression_utils.h"

namespace metrics {

namespace {

// Represent a flushed log and its metadata to be used for testing.
struct TestLog {};

const char kTestUploadUrl[] =;
const char kTestMimeType[] =;

class TestLogStore : public LogStore {};

class TestReportingService : public ReportingService {};

class ReportingServiceTest : public testing::Test {};

}  // namespace

TEST_F(ReportingServiceTest, BasicTest) {}

TEST_F(ReportingServiceTest, UserIdLogsUploadedIfUserConsented) {}

TEST_F(ReportingServiceTest, UserIdLogsNotUploadedIfUserNotConsented) {}

TEST_F(ReportingServiceTest, ForceDiscard) {}

}  // namespace metrics